merge
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Wed, 12 Dec 2012 11:19:29 +0100
changeset 19556 942c4c79b903
parent 19555 11655483f3de (current diff)
parent 19021 7b227385bb5f (diff)
child 19557 776f16fff90f
merge
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
src-db/database/model/tables/FIN_PAYMENT_SCHEDULEDETAIL.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_DATASET.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
src-db/database/sourcedata/AD_TREENODE.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
src-db/database/sourcedata/AD_WINDOW.xml
src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
src-db/database/sourcedata/OBUIAPP_PROCESS.xml
src-db/database/sourcedata/OBUIAPP_REF_WINDOW.xml
--- a/.hgsigs	Thu Nov 22 10:09:05 2012 +0100
+++ b/.hgsigs	Wed Dec 12 11:19:29 2012 +0100
@@ -87,3 +87,7 @@
 12914c7ff338d71cdb942a1222174e6afa8771b2 0 iEYEABECAAYFAlCO6PcACgkQCX/oGf+2qkMl/wCfRObV0QOmE8SyyLxPPehcVX51Ho8AmwaEYe6MQiQDKgTY6rm/XMlBvBRa
 aee16f41346874b9e355af6007df8df57b7f0266 0 iEYEABECAAYFAlBut3kACgkQCX/oGf+2qkPE8gCaAyk5dQSNyoOSpzPeOEtOLBhrF0MAn3XWPPVJ1Pb7vCei3oE3aQ8Ctj9o
 99f8eda49e53a4782416f5b18442945c4b5e63b5 0 iEYEABECAAYFAlCRrN8ACgkQCX/oGf+2qkOAJQCdGW7u6kmDrbDAerqPP8WEjveCCA8AoKnuoxJ0oG4YoECyXIAAFwQPVR+/
+4b4a381ce5f1ab178b70cff0408a704d2664eeb4 0 iEYEABECAAYFAlCqKx0ACgkQCX/oGf+2qkNnsgCgqCiBKwrB3BQ/UmF4dUpLYikmilcAniEMo6Ksu0zMxz93ych/mjpKg9Kx
+dcee1af5f243600cbed68798e892b7ba73a06ffa 0 iEYEABECAAYFAlC081kACgkQCX/oGf+2qkMU0ACfVvvLz1k+IF5axkQ2PQbFbJdLAVgAoN8XtUH6J76jpKSCx3GriplFPxdl
+d9dc1dcdb1f7da6ca0e0fcff57ac4f6c2f5e938c 0 iEYEABECAAYFAlCj2v8ACgkQCX/oGf+2qkPEsgCeOLWp7v5gU6Ip90kOBdOF+mejRHsAoObtRXJVe+gNq2nUa7Xu1EbVxsag
+3ded67251154d0aa958eacb918de97fd5a77e3dc 0 iEYEABECAAYFAlC3tuIACgkQCX/oGf+2qkO0zgCdFACe5suzHq8pukNoc8ghZJlvO6UAn3wzW4/wmIEfmngxthdtqRTrSQ2X
--- a/.hgtags	Thu Nov 22 10:09:05 2012 +0100
+++ b/.hgtags	Wed Dec 12 11:19:29 2012 +0100
@@ -98,3 +98,7 @@
 dd22f6b9902296a7d3f48b871fc8436ef20fdfdc 3.0MP15.2
 1cd80d4b32bbafca742ca1406fee082f97f5f254 3.0MP16
 84deb08844286485e5f948cdf06cec2ea727eddf 3.0MP16.1
+5a6b145a6dc21559e964dfc21039cf68ac3db351 3.0MP16.2
+c8ad7ddf47ddda7a33b56bafceff8d1ae5dadef2 3.0MP16.3
+f731024ec763373bd02a0825d0f42e1ddb15eb32 3.0MP17
+41ad849c6978ec887187853448c1f1a79fc01c4f 3.0MP17.1
--- a/README	Thu Nov 22 10:09:05 2012 +0100
+++ b/README	Wed Dec 12 11:19:29 2012 +0100
@@ -1,4 +1,4 @@
-This is the development trunk of Openbravo ERP.
+ This is the development trunk of Openbravo ERP.
 
 * Installation
 
--- a/build.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/build.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -1108,6 +1108,10 @@
   </target>
   
   
+  <target name="load.logoimages.forked">
+    <ant dir="${base.src}" target="load.logoimages.forked" inheritAll="true" inheritRefs="true" />
+  </target>
+
   <target name="load.logoimages">
     <ant dir="${base.src}" target="load.logoimages" inheritAll="true" inheritRefs="true" />
   </target>
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.class has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/modifiedTables/GL_JOURNALLINE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+  <database name="MODIFIED TABLE GL_JOURNALLINE">
+    <table name="GL_JOURNALLINE" primaryKey="GL_JOURNALENTRY_KEY">
+      <column name="EM_APRM_ADDPAYMENT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+    </table>
+  </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_FINACC_TRANSACTION_V">
-    <view name="APRM_FINACC_TRANSACTION_V"><![CDATA[SELECT trx.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id, trx.fin_finacc_transaction_id, trx.ad_client_id, trx.ad_org_id, trx.isactive, trx.created, trx.createdby, trx.updated, trx.updatedby, trx.fin_financial_account_id, trx.line, trx.description, trx.statementdate, trx.trxtype, trx.fin_payment_id, trx.c_glitem_id, trx.depositamt, trx.paymentamt, trx.c_currency_id, trx.fin_reconciliation_id, trx.status, trx.createdbyalgorithm, trx.posted, trx.dateacct, trx.processed, trx.processing, trx.user1_id, trx.user2_id, trx.c_activity_id, trx.c_campaign_id, trx.c_project_id, trx.foreign_currency_id, trx.foreign_amount, trx.em_aprm_modify, trx.foreign_convert_rate,  CASE trx.status WHEN 'RPPC' THEN 'Y' ELSE 'N' END AS cleared, COALESCE(trx.c_bpartner_id, p.c_bpartner_id) AS c_bpartner_id, trx.m_product_id, trx.c_salesregion_id, p.documentno AS paymentdocno, COALESCE(r.processed, 'N') AS reconciled, 'N' AS delete_btn, (SELECT ad_table.ad_table_id FROM ad_table WHERE lower(ad_table.tablename) = 'fin_finacc_transaction') AS forced_table_id FROM fin_finacc_transaction trx LEFT JOIN fin_payment p ON trx.fin_payment_id = p.fin_payment_id LEFT JOIN fin_reconciliation r ON trx.fin_reconciliation_id = r.fin_reconciliation_id]]></view>
+    <view name="APRM_FINACC_TRANSACTION_V"><![CDATA[SELECT trx.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id, trx.fin_finacc_transaction_id, trx.ad_client_id, trx.ad_org_id, trx.isactive, trx.created, trx.createdby, trx.updated, trx.updatedby, trx.fin_financial_account_id, trx.line, trx.description, trx.statementdate, trx.trxtype, trx.fin_payment_id, trx.c_glitem_id, trx.depositamt, trx.paymentamt, trx.c_currency_id, trx.fin_reconciliation_id, trx.status, trx.createdbyalgorithm, trx.posted, trx.dateacct, trx.processed, trx.processing, trx.user1_id, trx.user2_id, trx.c_activity_id, trx.c_campaign_id, trx.c_project_id, trx.foreign_currency_id, trx.foreign_amount, trx.em_aprm_modify, trx.foreign_convert_rate,  CASE trx.status WHEN 'RPPC' THEN 'Y' ELSE 'N' END AS cleared, COALESCE(trx.c_bpartner_id, p.c_bpartner_id) AS c_bpartner_id, trx.m_product_id, trx.c_salesregion_id, p.documentno AS paymentdocno, COALESCE(r.processed, 'N') AS reconciled, 'N' AS delete_btn, (SELECT ad_table.ad_table_id FROM ad_table WHERE lower(ad_table.tablename) = 'fin_finacc_transaction') AS forced_table_id, trx.c_costcenter_id FROM fin_finacc_transaction trx LEFT JOIN fin_payment p ON trx.fin_payment_id = p.fin_payment_id LEFT JOIN fin_reconciliation r ON trx.fin_reconciliation_id = r.fin_reconciliation_id]]></view>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -1,5 +1,16 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--06A84BC3EC66453191652F4F3A6859C1--><AD_AUXILIARINPUT>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_AUXILIARINPUT_ID><![CDATA[06A84BC3EC66453191652F4F3A6859C1]]></AD_AUXILIARINPUT_ID>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <NAME><![CDATA[DOCBASETYPE]]></NAME>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <CODE><![CDATA[FAT]]></CODE>
+<!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--06A84BC3EC66453191652F4F3A6859C1--></AD_AUXILIARINPUT>
+
 <!--21943DF0B89F4AE3AF14A9C06F1181C2--><AD_AUXILIARINPUT>
 <!--21943DF0B89F4AE3AF14A9C06F1181C2-->  <AD_AUXILIARINPUT_ID><![CDATA[21943DF0B89F4AE3AF14A9C06F1181C2]]></AD_AUXILIARINPUT_ID>
 <!--21943DF0B89F4AE3AF14A9C06F1181C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -11,6 +22,17 @@
 <!--21943DF0B89F4AE3AF14A9C06F1181C2-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--21943DF0B89F4AE3AF14A9C06F1181C2--></AD_AUXILIARINPUT>
 
+<!--4FA457B12B4E411FA662D4D97A53B2E1--><AD_AUXILIARINPUT>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <AD_AUXILIARINPUT_ID><![CDATA[4FA457B12B4E411FA662D4D97A53B2E1]]></AD_AUXILIARINPUT_ID>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <AD_TAB_ID><![CDATA[FF80808130BB89090130BB9A3A2B0043]]></AD_TAB_ID>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <NAME><![CDATA[DOCBASETYPE]]></NAME>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <CODE><![CDATA[FAT]]></CODE>
+<!--4FA457B12B4E411FA662D4D97A53B2E1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4FA457B12B4E411FA662D4D97A53B2E1--></AD_AUXILIARINPUT>
+
 <!--9D630C9E4C734361BFB09B153EEE3BCB--><AD_AUXILIARINPUT>
 <!--9D630C9E4C734361BFB09B153EEE3BCB-->  <AD_AUXILIARINPUT_ID><![CDATA[9D630C9E4C734361BFB09B153EEE3BCB]]></AD_AUXILIARINPUT_ID>
 <!--9D630C9E4C734361BFB09B153EEE3BCB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -33,6 +55,28 @@
 <!--D08EBACB459849488F49089EA28F96D9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--D08EBACB459849488F49089EA28F96D9--></AD_AUXILIARINPUT>
 
+<!--D6A7851C9B4745BD8DC91E429A7A0B19--><AD_AUXILIARINPUT>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <AD_AUXILIARINPUT_ID><![CDATA[D6A7851C9B4745BD8DC91E429A7A0B19]]></AD_AUXILIARINPUT_ID>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <NAME><![CDATA[DOCBASETYPE]]></NAME>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <CODE><![CDATA[FAT]]></CODE>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--D6A7851C9B4745BD8DC91E429A7A0B19--></AD_AUXILIARINPUT>
+
+<!--ED969CB603E24D5EBB26282C6B994566--><AD_AUXILIARINPUT>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <AD_AUXILIARINPUT_ID><![CDATA[ED969CB603E24D5EBB26282C6B994566]]></AD_AUXILIARINPUT_ID>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <AD_TAB_ID><![CDATA[79DFBE24B39742AD877E3163643E619F]]></AD_TAB_ID>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <NAME><![CDATA[DOCBASETYPE]]></NAME>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <CODE><![CDATA[REC]]></CODE>
+<!--ED969CB603E24D5EBB26282C6B994566-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--ED969CB603E24D5EBB26282C6B994566--></AD_AUXILIARINPUT>
+
 <!--FF808081308851A40130887E45400063--><AD_AUXILIARINPUT>
 <!--FF808081308851A40130887E45400063-->  <AD_AUXILIARINPUT_ID><![CDATA[FF808081308851A40130887E45400063]]></AD_AUXILIARINPUT_ID>
 <!--FF808081308851A40130887E45400063-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -1124,6 +1124,41 @@
 <!--385DE6A637CD4D788AB480B3D1369E4F-->  <EM_OBUIAPP_PROCESS_ID><![CDATA[4EEB3497082C4F2182E16A4371CD5D96]]></EM_OBUIAPP_PROCESS_ID>
 <!--385DE6A637CD4D788AB480B3D1369E4F--></AD_COLUMN>
 
+<!--38816E45B3B3435BA5A9D7469352D5CE--><AD_COLUMN>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_COLUMN_ID><![CDATA[38816E45B3B3435BA5A9D7469352D5CE]]></AD_COLUMN_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <NAME><![CDATA[Cost Center]]></NAME>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <DESCRIPTION><![CDATA[Division that adds to the cost of an organization]]></DESCRIPTION>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <HELP><![CDATA[Division that adds to the cost of an organization. Internal structure for cost allocation.]]></HELP>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <COLUMNNAME><![CDATA[C_Costcenter_ID]]></COLUMNNAME>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <SEQNO><![CDATA[440]]></SEQNO>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_ELEMENT_ID><![CDATA[BB1B0593596A4F63B2553183B11B0D28]]></AD_ELEMENT_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <POSITION><![CDATA[44]]></POSITION>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--38816E45B3B3435BA5A9D7469352D5CE-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--38816E45B3B3435BA5A9D7469352D5CE--></AD_COLUMN>
+
 <!--3A586ACEBE4B4367B81088F1C796FF2E--><AD_COLUMN>
 <!--3A586ACEBE4B4367B81088F1C796FF2E-->  <AD_COLUMN_ID><![CDATA[3A586ACEBE4B4367B81088F1C796FF2E]]></AD_COLUMN_ID>
 <!--3A586ACEBE4B4367B81088F1C796FF2E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1805,7 +1840,8 @@
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <AD_TABLE_ID><![CDATA[1BAA61D216CB4A62838AA785658EE092]]></AD_TABLE_ID>
-<!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--50D9D2D098E54FB7B5109C4BAA8977A5-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -1944,7 +1980,8 @@
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <COLUMNNAME><![CDATA[User2_ID]]></COLUMNNAME>
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <AD_TABLE_ID><![CDATA[FF80808130BB89090130BB8E3D7E0012]]></AD_TABLE_ID>
-<!--59B17ED569B444C5A27232D87DBFDC20-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--59B17ED569B444C5A27232D87DBFDC20-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--59B17ED569B444C5A27232D87DBFDC20-->  <AD_REFERENCE_VALUE_ID><![CDATA[1850A5390D97470EBB35A3A5F43AB533]]></AD_REFERENCE_VALUE_ID>
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--59B17ED569B444C5A27232D87DBFDC20-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -2332,7 +2369,8 @@
 <!--6BBCB749C7C640A08F573BF86D270171-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--6BBCB749C7C640A08F573BF86D270171-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--6BBCB749C7C640A08F573BF86D270171-->  <AD_TABLE_ID><![CDATA[FF80808130BB89090130BB8E3D7E0012]]></AD_TABLE_ID>
-<!--6BBCB749C7C640A08F573BF86D270171-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--6BBCB749C7C640A08F573BF86D270171-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--6BBCB749C7C640A08F573BF86D270171-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
 <!--6BBCB749C7C640A08F573BF86D270171-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--6BBCB749C7C640A08F573BF86D270171-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--6BBCB749C7C640A08F573BF86D270171-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -6505,7 +6543,8 @@
 <!--A37C6F84AA383F50E040007F01006E35-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--A37C6F84AA383F50E040007F01006E35-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--A37C6F84AA383F50E040007F01006E35-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
-<!--A37C6F84AA383F50E040007F01006E35-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--A37C6F84AA383F50E040007F01006E35-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--A37C6F84AA383F50E040007F01006E35-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
 <!--A37C6F84AA383F50E040007F01006E35-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--A37C6F84AA383F50E040007F01006E35-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--A37C6F84AA383F50E040007F01006E35-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -6540,7 +6579,8 @@
 <!--A37C6F84AA393F50E040007F01006E35-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--A37C6F84AA393F50E040007F01006E35-->  <COLUMNNAME><![CDATA[User2_ID]]></COLUMNNAME>
 <!--A37C6F84AA393F50E040007F01006E35-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
-<!--A37C6F84AA393F50E040007F01006E35-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--A37C6F84AA393F50E040007F01006E35-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--A37C6F84AA393F50E040007F01006E35-->  <AD_REFERENCE_VALUE_ID><![CDATA[1850A5390D97470EBB35A3A5F43AB533]]></AD_REFERENCE_VALUE_ID>
 <!--A37C6F84AA393F50E040007F01006E35-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--A37C6F84AA393F50E040007F01006E35-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--A37C6F84AA393F50E040007F01006E35-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -6885,7 +6925,8 @@
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <COLUMNNAME><![CDATA[User2_ID]]></COLUMNNAME>
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <AD_TABLE_ID><![CDATA[1BAA61D216CB4A62838AA785658EE092]]></AD_TABLE_ID>
-<!--A6B405E9791D4BC685220C11CCA916C0-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--A6B405E9791D4BC685220C11CCA916C0-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
+<!--A6B405E9791D4BC685220C11CCA916C0-->  <AD_REFERENCE_VALUE_ID><![CDATA[1850A5390D97470EBB35A3A5F43AB533]]></AD_REFERENCE_VALUE_ID>
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--A6B405E9791D4BC685220C11CCA916C0-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -8168,6 +8209,43 @@
 <!--DD5C635F60EF4CA6BD8395F81E8466AD-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--DD5C635F60EF4CA6BD8395F81E8466AD--></AD_COLUMN>
 
+<!--E206BFA90CC94498B257BC65C516B9C5--><AD_COLUMN>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <NAME><![CDATA[EM_APRM_Add Payment]]></NAME>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DESCRIPTION><![CDATA[Add Payment button.]]></DESCRIPTION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <HELP><![CDATA[Launches a process to add a payment to the selected invoice.]]></HELP>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <COLUMNNAME><![CDATA[EM_Aprm_Addpayment]]></COLUMNNAME>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <SEQNO><![CDATA[131]]></SEQNO>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_ELEMENT_ID><![CDATA[78A3787B4823C096E040007F0101250E]]></AD_ELEMENT_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[38]]></POSITION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--E206BFA90CC94498B257BC65C516B9C5--></AD_COLUMN>
+
 <!--E3E69DDF3725407BABA84827647EF002--><AD_COLUMN>
 <!--E3E69DDF3725407BABA84827647EF002-->  <AD_COLUMN_ID><![CDATA[E3E69DDF3725407BABA84827647EF002]]></AD_COLUMN_ID>
 <!--E3E69DDF3725407BABA84827647EF002-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -72,6 +72,20 @@
 <!--4AC57284C5C745EB9087C105222EDF02-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--4AC57284C5C745EB9087C105222EDF02--></AD_ELEMENT>
 
+<!--519F3CD67106443CBF25694F1BB6E92B--><AD_ELEMENT>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <AD_ELEMENT_ID><![CDATA[519F3CD67106443CBF25694F1BB6E92B]]></AD_ELEMENT_ID>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <COLUMNNAME><![CDATA[Matchreference]]></COLUMNNAME>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <NAME><![CDATA[Match Reference]]></NAME>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <PRINTNAME><![CDATA[Match Reference]]></PRINTNAME>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <DESCRIPTION><![CDATA[Algorithm tries to match reference]]></DESCRIPTION>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <HELP><![CDATA[The algorithm will try to match using reference.]]></HELP>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--519F3CD67106443CBF25694F1BB6E92B-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--519F3CD67106443CBF25694F1BB6E92B--></AD_ELEMENT>
+
 <!--56CC0941477A4250AD07527AE15FAC61--><AD_ELEMENT>
 <!--56CC0941477A4250AD07527AE15FAC61-->  <AD_ELEMENT_ID><![CDATA[56CC0941477A4250AD07527AE15FAC61]]></AD_ELEMENT_ID>
 <!--56CC0941477A4250AD07527AE15FAC61-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -166,6 +180,8 @@
 <!--78A3787B4823C096E040007F0101250E-->  <PRINTNAME><![CDATA[Add Payment]]></PRINTNAME>
 <!--78A3787B4823C096E040007F0101250E-->  <DESCRIPTION><![CDATA[Add Payment button.]]></DESCRIPTION>
 <!--78A3787B4823C096E040007F0101250E-->  <HELP><![CDATA[Launches a process to add a payment to the selected invoice.]]></HELP>
+<!--78A3787B4823C096E040007F0101250E-->  <PO_NAME><![CDATA[Add Payment]]></PO_NAME>
+<!--78A3787B4823C096E040007F0101250E-->  <PO_PRINTNAME><![CDATA[Add Payment]]></PO_PRINTNAME>
 <!--78A3787B4823C096E040007F0101250E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--78A3787B4823C096E040007F0101250E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--78A3787B4823C096E040007F0101250E--></AD_ELEMENT>
@@ -467,6 +483,20 @@
 <!--A28B183E6A9B34C0E040007F010067F9-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--A28B183E6A9B34C0E040007F010067F9--></AD_ELEMENT>
 
+<!--A2966FBA8749447F88BEEC89117C6915--><AD_ELEMENT>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <AD_ELEMENT_ID><![CDATA[A2966FBA8749447F88BEEC89117C6915]]></AD_ELEMENT_ID>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <COLUMNNAME><![CDATA[Matchbpname]]></COLUMNNAME>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <NAME><![CDATA[Match BP Name]]></NAME>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <PRINTNAME><![CDATA[Match BP Name]]></PRINTNAME>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <DESCRIPTION><![CDATA[Algorithm tries to mach business partner name]]></DESCRIPTION>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <HELP><![CDATA[The algorithm will try to match using busines partner name.]]></HELP>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--A2966FBA8749447F88BEEC89117C6915-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--A2966FBA8749447F88BEEC89117C6915--></AD_ELEMENT>
+
 <!--A37C6F84AA423F50E040007F01006E35--><AD_ELEMENT>
 <!--A37C6F84AA423F50E040007F01006E35-->  <AD_ELEMENT_ID><![CDATA[A37C6F84AA423F50E040007F01006E35]]></AD_ELEMENT_ID>
 <!--A37C6F84AA423F50E040007F01006E35-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -649,6 +679,20 @@
 <!--DB85AA94D6DF4D7CB29CE7999B15F9C7-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--DB85AA94D6DF4D7CB29CE7999B15F9C7--></AD_ELEMENT>
 
+<!--DE92C5C14E9647D5B4E71F0C8E89E984--><AD_ELEMENT>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <AD_ELEMENT_ID><![CDATA[DE92C5C14E9647D5B4E71F0C8E89E984]]></AD_ELEMENT_ID>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <COLUMNNAME><![CDATA[Matchtransactiondate]]></COLUMNNAME>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <NAME><![CDATA[Match Transaction Date]]></NAME>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <PRINTNAME><![CDATA[Match Transaction Date]]></PRINTNAME>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <DESCRIPTION><![CDATA[Algorithm tries to match transaction date]]></DESCRIPTION>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <HELP><![CDATA[The algorithm will try to match using transaction date.]]></HELP>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--DE92C5C14E9647D5B4E71F0C8E89E984--></AD_ELEMENT>
+
 <!--EDB9CF491555465382F828F48291A0C0--><AD_ELEMENT>
 <!--EDB9CF491555465382F828F48291A0C0-->  <AD_ELEMENT_ID><![CDATA[EDB9CF491555465382F828F48291A0C0]]></AD_ELEMENT_ID>
 <!--EDB9CF491555465382F828F48291A0C0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -782,6 +782,36 @@
 <!--1106ED7C155243B38D6B1EC8E44B75B2-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--1106ED7C155243B38D6B1EC8E44B75B2--></AD_FIELD>
 
+<!--110FB2A04E69473784A8478D0BD8B3FB--><AD_FIELD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_FIELD_ID><![CDATA[110FB2A04E69473784A8478D0BD8B3FB]]></AD_FIELD_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <NAME><![CDATA[Add Payment]]></NAME>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DESCRIPTION><![CDATA[Add Payment From Journal Line]]></DESCRIPTION>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <HELP><![CDATA[Process to add new Payments from the G/L Journal Lines.]]></HELP>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='' & @Processed@='Y']]></DISPLAYLOGIC>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <SEQNO><![CDATA[240]]></SEQNO>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--110FB2A04E69473784A8478D0BD8B3FB--></AD_FIELD>
+
 <!--1186723500D044EBBDB20410F8E0FED8--><AD_FIELD>
 <!--1186723500D044EBBDB20410F8E0FED8-->  <AD_FIELD_ID><![CDATA[1186723500D044EBBDB20410F8E0FED8]]></AD_FIELD_ID>
 <!--1186723500D044EBBDB20410F8E0FED8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1247,9 +1277,12 @@
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <AD_TAB_ID><![CDATA[79DFBE24B39742AD877E3163643E619F]]></AD_TAB_ID>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <AD_COLUMN_ID><![CDATA[0ABEEFADB4C04B7F9EAA2720A35E2A5C]]></AD_COLUMN_ID>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--1CBD4975F2F3402492BAFA148B6C0173-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1CBD4975F2F3402492BAFA148B6C0173-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1CBD4975F2F3402492BAFA148B6C0173-->  <SEQNO><![CDATA[2020]]></SEQNO>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1CBD4975F2F3402492BAFA148B6C0173-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3972,7 +4005,7 @@
 <!--55E47437B52847D4AC6193187048D1D1-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--55E47437B52847D4AC6193187048D1D1-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--55E47437B52847D4AC6193187048D1D1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--55E47437B52847D4AC6193187048D1D1-->  <DISPLAYLOGIC><![CDATA[@$Element_BP@='Y']]></DISPLAYLOGIC>
+<!--55E47437B52847D4AC6193187048D1D1-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--55E47437B52847D4AC6193187048D1D1-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--55E47437B52847D4AC6193187048D1D1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--55E47437B52847D4AC6193187048D1D1-->  <SEQNO><![CDATA[130]]></SEQNO>
@@ -4056,7 +4089,7 @@
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <AD_COLUMN_ID><![CDATA[1D64AD4366EF4A209F2A462A8DE42735]]></AD_COLUMN_ID>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--576653206CA64C59BF19A53B94AEDBA8-->  <DISPLAYLOGIC><![CDATA[@$Element_PJ@='Y']]></DISPLAYLOGIC>
+<!--576653206CA64C59BF19A53B94AEDBA8-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--576653206CA64C59BF19A53B94AEDBA8-->  <SEQNO><![CDATA[160]]></SEQNO>
@@ -4407,6 +4440,37 @@
 <!--6073AD930DD34DB0B565174C9267D59F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--6073AD930DD34DB0B565174C9267D59F--></AD_FIELD>
 
+<!--60A9E4607D214CC487C88AE2F8DCC9CE--><AD_FIELD>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_FIELD_ID><![CDATA[60A9E4607D214CC487C88AE2F8DCC9CE]]></AD_FIELD_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <NAME><![CDATA[Cost Center]]></NAME>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <DESCRIPTION><![CDATA[Division that adds to the cost of an organization]]></DESCRIPTION>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <HELP><![CDATA[Division that adds to the cost of an organization. Internal structure for cost allocation.]]></HELP>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_COLUMN_ID><![CDATA[38816E45B3B3435BA5A9D7469352D5CE]]></AD_COLUMN_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <SEQNO><![CDATA[2030]]></SEQNO>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--60A9E4607D214CC487C88AE2F8DCC9CE--></AD_FIELD>
+
 <!--6100B2A9701942FC9717D3F6FDB0D6B2--><AD_FIELD>
 <!--6100B2A9701942FC9717D3F6FDB0D6B2-->  <AD_FIELD_ID><![CDATA[6100B2A9701942FC9717D3F6FDB0D6B2]]></AD_FIELD_ID>
 <!--6100B2A9701942FC9717D3F6FDB0D6B2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -5844,9 +5908,12 @@
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <AD_TAB_ID><![CDATA[79DFBE24B39742AD877E3163643E619F]]></AD_TAB_ID>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <AD_COLUMN_ID><![CDATA[0F050666DA634EAE8919F239440ACF8A]]></AD_COLUMN_ID>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <SEQNO><![CDATA[2010]]></SEQNO>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7C7B9B83B91D40E890E4DF625E60D9F4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -9143,11 +9210,12 @@
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <AD_COLUMN_ID><![CDATA[BBA3DB68DBD844B29F1EEC9A04F112E8]]></AD_COLUMN_ID>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--8C8A4128A9384B3087CCD1759C603A0B-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--8C8A4128A9384B3087CCD1759C603A0B-->  <DISPLAYLOGIC><![CDATA[@$Element_PR@='Y']]></DISPLAYLOGIC>
+<!--8C8A4128A9384B3087CCD1759C603A0B-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--8C8A4128A9384B3087CCD1759C603A0B-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--8C8A4128A9384B3087CCD1759C603A0B-->  <SEQNO><![CDATA[2010]]></SEQNO>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--8C8A4128A9384B3087CCD1759C603A0B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -10839,9 +10907,12 @@
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA383F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--A37C70FE6B9DC015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--A37C70FE6B9DC015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--A37C70FE6B9DC015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--A37C70FE6B9DC015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--A37C70FE6B9DC015E040007F01006DF4-->  <SEQNO><![CDATA[2070]]></SEQNO>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6B9DC015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -10866,9 +10937,12 @@
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA393F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--A37C70FE6B9EC015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--A37C70FE6B9EC015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
+<!--A37C70FE6B9EC015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--A37C70FE6B9EC015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--A37C70FE6B9EC015E040007F01006DF4-->  <SEQNO><![CDATA[2080]]></SEQNO>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6B9EC015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -10893,10 +10967,12 @@
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA3A3F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A37C70FE6B9FC015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@$Element_AY@='Y']]></DISPLAYLOGIC>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--A37C70FE6B9FC015E040007F01006DF4-->  <SEQNO><![CDATA[2050]]></SEQNO>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6B9FC015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -10921,10 +10997,12 @@
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA3B3F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A37C70FE6BA0C015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@$Element_MC@='Y']]></DISPLAYLOGIC>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--A37C70FE6BA0C015E040007F01006DF4-->  <SEQNO><![CDATA[2040]]></SEQNO>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6BA0C015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -10949,11 +11027,12 @@
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA3C3F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A37C70FE6BA1C015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--A37C70FE6BA1C015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@$Element_PJ@='Y']]></DISPLAYLOGIC>
+<!--A37C70FE6BA1C015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--A37C70FE6BA1C015E040007F01006DF4-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--A37C70FE6BA1C015E040007F01006DF4-->  <SEQNO><![CDATA[2020]]></SEQNO>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6BA1C015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -11005,11 +11084,12 @@
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <AD_COLUMN_ID><![CDATA[A37C6F84AA3E3F50E040007F01006E35]]></AD_COLUMN_ID>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A37C70FE6BA3C015E040007F01006DF4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--A37C70FE6BA3C015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@$Element_BP@='Y']]></DISPLAYLOGIC>
+<!--A37C70FE6BA3C015E040007F01006DF4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--A37C70FE6BA3C015E040007F01006DF4-->  <SEQNO><![CDATA[34]]></SEQNO>
+<!--A37C70FE6BA3C015E040007F01006DF4-->  <SEQNO><![CDATA[2000]]></SEQNO>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A37C70FE6BA3C015E040007F01006DF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -12578,6 +12658,7 @@
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <AD_COLUMN_ID><![CDATA[806198F4784445109D9067A0C868701C]]></AD_COLUMN_ID>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--B2F1D76CA33240B69A4012D5CA370476-->  <DISPLAYLOGIC><![CDATA[@$Element_AS@='Y']]></DISPLAYLOGIC>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--B2F1D76CA33240B69A4012D5CA370476-->  <SEQNO><![CDATA[150]]></SEQNO>
@@ -14135,11 +14216,12 @@
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <AD_COLUMN_ID><![CDATA[A13138E3D6E44C72A7F24B7AA9365B37]]></AD_COLUMN_ID>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CB9B7A7C9AB845E299BA3385935C33B5-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <DISPLAYLOGIC><![CDATA[@$Element_SR@='Y']]></DISPLAYLOGIC>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--CB9B7A7C9AB845E299BA3385935C33B5-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--CB9B7A7C9AB845E299BA3385935C33B5-->  <SEQNO><![CDATA[2060]]></SEQNO>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--CB9B7A7C9AB845E299BA3385935C33B5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -14911,10 +14993,12 @@
 <!--E4755F06568943EAABB510542A7159A4-->  <AD_TAB_ID><![CDATA[79DFBE24B39742AD877E3163643E619F]]></AD_TAB_ID>
 <!--E4755F06568943EAABB510542A7159A4-->  <AD_COLUMN_ID><![CDATA[A437240FB0894CFFAA0C96A925D69141]]></AD_COLUMN_ID>
 <!--E4755F06568943EAABB510542A7159A4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E4755F06568943EAABB510542A7159A4-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--E4755F06568943EAABB510542A7159A4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--E4755F06568943EAABB510542A7159A4-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--E4755F06568943EAABB510542A7159A4-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--E4755F06568943EAABB510542A7159A4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--E4755F06568943EAABB510542A7159A4-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--E4755F06568943EAABB510542A7159A4-->  <SEQNO><![CDATA[2000]]></SEQNO>
 <!--E4755F06568943EAABB510542A7159A4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--E4755F06568943EAABB510542A7159A4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--E4755F06568943EAABB510542A7159A4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -15217,7 +15301,7 @@
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <AD_COLUMN_ID><![CDATA[528EE4D486444C08A1CE90CAA066BA48]]></AD_COLUMN_ID>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--E81BDEBDB5C0448DAECD48AA5857A091-->  <DISPLAYLOGIC><![CDATA[@$Element_PR@='Y']]></DISPLAYLOGIC>
+<!--E81BDEBDB5C0448DAECD48AA5857A091-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--E81BDEBDB5C0448DAECD48AA5857A091-->  <SEQNO><![CDATA[140]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELDGROUP.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELDGROUP.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -9,6 +9,15 @@
 <!--8C3C34F7EFD04E11A3105EB74BC9999E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--8C3C34F7EFD04E11A3105EB74BC9999E--></AD_FIELDGROUP>
 
+<!--ED0E74721EA74F36A471345649162E9A--><AD_FIELDGROUP>
+<!--ED0E74721EA74F36A471345649162E9A-->  <AD_FIELDGROUP_ID><![CDATA[ED0E74721EA74F36A471345649162E9A]]></AD_FIELDGROUP_ID>
+<!--ED0E74721EA74F36A471345649162E9A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--ED0E74721EA74F36A471345649162E9A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--ED0E74721EA74F36A471345649162E9A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--ED0E74721EA74F36A471345649162E9A-->  <NAME><![CDATA[Settings]]></NAME>
+<!--ED0E74721EA74F36A471345649162E9A-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--ED0E74721EA74F36A471345649162E9A--></AD_FIELDGROUP>
+
 <!--F5CFE042E5F4469CA69E62A20BCF63FA--><AD_FIELDGROUP>
 <!--F5CFE042E5F4469CA69E62A20BCF63FA-->  <AD_FIELDGROUP_ID><![CDATA[F5CFE042E5F4469CA69E62A20BCF63FA]]></AD_FIELDGROUP_ID>
 <!--F5CFE042E5F4469CA69E62A20BCF63FA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FORM.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FORM.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -20,7 +20,7 @@
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <NAME><![CDATA[Payment Execution]]></NAME>
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <DESCRIPTION><![CDATA[This window allows payment execution management for payments in status "awaiting execution".]]></DESCRIPTION>
-<!--FE9623C32FE749DD803ED7C64CCD7405-->  <HELP><![CDATA[Using this form users can manage deferred payment executions as well as payments that failed during execution (paper jam, any problem occurred due to connection). Some filtering options are provided (payment method, financial account, payment proposal, executed flag) and a grid is displayed with the payments to be executed. Once the set of payments is selected and execute button is pressed, system will prompt user for input parameters.]]></HELP>
+<!--FE9623C32FE749DD803ED7C64CCD7405-->  <HELP><![CDATA[Payment Execution form allows to massively execute deferred payments in an "Awaiting Execution" status.]]></HELP>
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution]]></CLASSNAME>
 <!--FE9623C32FE749DD803ED7C64CCD7405-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -48,6 +48,18 @@
 <!--46A3E47C3F414E948988B487A85FC244-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--46A3E47C3F414E948988B487A85FC244--></AD_MODEL_OBJECT>
 
+<!--733555DE925D4789BF94835D50EEEE14--><AD_MODEL_OBJECT>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_MODEL_OBJECT_ID><![CDATA[733555DE925D4789BF94835D50EEEE14]]></AD_MODEL_OBJECT_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ACTION><![CDATA[P]]></ACTION>
+<!--733555DE925D4789BF94835D50EEEE14-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.FIN_AddPaymentFromJournal]]></CLASSNAME>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_PROCESS_ID><![CDATA[5BE14AA10165490A9ADEFB7532F7FA94]]></AD_PROCESS_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--733555DE925D4789BF94835D50EEEE14--></AD_MODEL_OBJECT>
+
 <!--89313103AC3C4CC0BF080175CE85AEE9--><AD_MODEL_OBJECT>
 <!--89313103AC3C4CC0BF080175CE85AEE9-->  <AD_MODEL_OBJECT_ID><![CDATA[89313103AC3C4CC0BF080175CE85AEE9]]></AD_MODEL_OBJECT_ID>
 <!--89313103AC3C4CC0BF080175CE85AEE9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -180,6 +192,18 @@
 <!--DF09705B3D7F4756A1E741FB3E73B825-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--DF09705B3D7F4756A1E741FB3E73B825--></AD_MODEL_OBJECT>
 
+<!--E711C538D5414BC6AABC2281BEA2F738--><AD_MODEL_OBJECT>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_MODEL_OBJECT_ID><![CDATA[E711C538D5414BC6AABC2281BEA2F738]]></AD_MODEL_OBJECT_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ACTION><![CDATA[P]]></ACTION>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.FIN_AddPaymentFromJournalLine]]></CLASSNAME>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--E711C538D5414BC6AABC2281BEA2F738-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--E711C538D5414BC6AABC2281BEA2F738--></AD_MODEL_OBJECT>
+
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE--><AD_MODEL_OBJECT>
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE-->  <AD_MODEL_OBJECT_ID><![CDATA[E7D054B44F5848B6B6FC5923EBA4E1DE]]></AD_MODEL_OBJECT_ID>
 <!--E7D054B44F5848B6B6FC5923EBA4E1DE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.18511]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.19003]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--B97FC854C6DD41E692161585645A900F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--B97FC854C6DD41E692161585645A900F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -140,6 +140,25 @@
 <!--58A9261BACEF45DDA526F29D8557272D-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--58A9261BACEF45DDA526F29D8557272D--></AD_PROCESS>
 
+<!--5BE14AA10165490A9ADEFB7532F7FA94--><AD_PROCESS>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_PROCESS_ID><![CDATA[5BE14AA10165490A9ADEFB7532F7FA94]]></AD_PROCESS_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <VALUE><![CDATA[FIN_AddPaymentFromJournal]]></VALUE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <NAME><![CDATA[Add Payment From Journal]]></NAME>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94--></AD_PROCESS>
+
 <!--6255BE488882480599C81284B70CD9B3--><AD_PROCESS>
 <!--6255BE488882480599C81284B70CD9B3-->  <AD_PROCESS_ID><![CDATA[6255BE488882480599C81284B70CD9B3]]></AD_PROCESS_ID>
 <!--6255BE488882480599C81284B70CD9B3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -318,6 +337,27 @@
 <!--DC23BB9234174E52879E4B21C8CD1F4B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--DC23BB9234174E52879E4B21C8CD1F4B--></AD_PROCESS>
 
+<!--DE1B382FDD2540199D223586F6E216D0--><AD_PROCESS>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <VALUE><![CDATA[FIN_AddPaymentFromJournalLine]]></VALUE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <NAME><![CDATA[Add Payment From Journal Line]]></NAME>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <DESCRIPTION><![CDATA[Add Payment From Journal Line]]></DESCRIPTION>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <HELP><![CDATA[Process to add new Payments from the G/L Journal Lines.]]></HELP>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--DE1B382FDD2540199D223586F6E216D0--></AD_PROCESS>
+
 <!--E011F492B0814A74B63CD1F3B9FF0526--><AD_PROCESS>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <AD_PROCESS_ID><![CDATA[E011F492B0814A74B63CD1F3B9FF0526]]></AD_PROCESS_ID>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -1,5 +1,26 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--173E22F30A234210BE895DBB291AE971--><AD_PROCESS_PARA>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_PARA_ID><![CDATA[173E22F30A234210BE895DBB291AE971]]></AD_PROCESS_PARA_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--173E22F30A234210BE895DBB291AE971-->  <NAME><![CDATA[Payment Method]]></NAME>
+<!--173E22F30A234210BE895DBB291AE971-->  <DESCRIPTION><![CDATA[It is the method by which payment is expected to be made or received.]]></DESCRIPTION>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_VALUE_ID><![CDATA[EED0EF97D4A7421687F3B365D009E7A6]]></AD_REFERENCE_VALUE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
+<!--173E22F30A234210BE895DBB291AE971-->  <COLUMNNAME><![CDATA[fin_paymentmethod_id]]></COLUMNNAME>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--173E22F30A234210BE895DBB291AE971-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--173E22F30A234210BE895DBB291AE971-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--173E22F30A234210BE895DBB291AE971-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_PAYMENTMETHOD_ID@ IS NOT NULL AND @FIN_PAYMENTMETHOD_ID@ <> COALESCE('','-1')) THEN @FIN_PAYMENTMETHOD_ID@ ELSE (CASE WHEN (TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@) > 0) THEN fin_paymentmethod_id ELSE po_paymentmethod_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--173E22F30A234210BE895DBB291AE971-->  <AD_ELEMENT_ID><![CDATA[7DC34559B411B45BE040007F0100784A]]></AD_ELEMENT_ID>
+<!--173E22F30A234210BE895DBB291AE971--></AD_PROCESS_PARA>
+
 <!--1913962D2952412B84B8CDD3BC17026F--><AD_PROCESS_PARA>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_PROCESS_PARA_ID><![CDATA[1913962D2952412B84B8CDD3BC17026F]]></AD_PROCESS_PARA_ID>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21,6 +42,24 @@
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_ELEMENT_ID><![CDATA[454]]></AD_ELEMENT_ID>
 <!--1913962D2952412B84B8CDD3BC17026F--></AD_PROCESS_PARA>
 
+<!--28734F2240554E628433520DBFA0A75A--><AD_PROCESS_PARA>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_PARA_ID><![CDATA[28734F2240554E628433520DBFA0A75A]]></AD_PROCESS_PARA_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--28734F2240554E628433520DBFA0A75A-->  <NAME><![CDATA[Date]]></NAME>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
+<!--28734F2240554E628433520DBFA0A75A-->  <COLUMNNAME><![CDATA[Date]]></COLUMNNAME>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--28734F2240554E628433520DBFA0A75A-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--28734F2240554E628433520DBFA0A75A-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--28734F2240554E628433520DBFA0A75A-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--28734F2240554E628433520DBFA0A75A-->  <AD_ELEMENT_ID><![CDATA[17ADA898A5534B858EC8BD7651492088]]></AD_ELEMENT_ID>
+<!--28734F2240554E628433520DBFA0A75A--></AD_PROCESS_PARA>
+
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--><AD_PROCESS_PARA>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_PROCESS_PARA_ID><![CDATA[4F5EE1017087464EAD95F3CCA4C5AFA5]]></AD_PROCESS_PARA_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -42,6 +81,28 @@
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_ELEMENT_ID><![CDATA[208]]></AD_ELEMENT_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--></AD_PROCESS_PARA>
 
+<!--65B5C8CA308F46988BDE3E31BC1D78C8--><AD_PROCESS_PARA>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_PARA_ID><![CDATA[65B5C8CA308F46988BDE3E31BC1D78C8]]></AD_PROCESS_PARA_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <NAME><![CDATA[Business Partner]]></NAME>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DESCRIPTION><![CDATA[Anyone who takes part in daily business operations by acting as a customer, employee, etc.]]></DESCRIPTION>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <HELP><![CDATA[A Business Partner is anyone with whom you transact.  This can include a customer, vendor, employee or any combination of these.]]></HELP>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_VALUE_ID><![CDATA[138]]></AD_REFERENCE_VALUE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_VAL_RULE_ID><![CDATA[E491153CCBEE49A1842A7CC8544929DD]]></AD_VAL_RULE_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <COLUMNNAME><![CDATA[c_bpartner_para_id]]></COLUMNNAME>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DEFAULTVALUE><![CDATA[@C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ELEMENT_ID><![CDATA[187]]></AD_ELEMENT_ID>
+<!--65B5C8CA308F46988BDE3E31BC1D78C8--></AD_PROCESS_PARA>
+
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8--><AD_PROCESS_PARA>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_PROCESS_PARA_ID><![CDATA[6EEE4A4DB1BA476BA7929EC7FCF285F8]]></AD_PROCESS_PARA_ID>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -207,6 +268,50 @@
 <!--D04309BB0DA14B5789FB76C141ED464C-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
 <!--D04309BB0DA14B5789FB76C141ED464C--></AD_PROCESS_PARA>
 
+<!--D2D748A3C65F4976B4461635A04EFA5F--><AD_PROCESS_PARA>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_PARA_ID><![CDATA[D2D748A3C65F4976B4461635A04EFA5F]]></AD_PROCESS_PARA_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <NAME><![CDATA[Financial Account]]></NAME>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_VALUE_ID><![CDATA[DF1CEA94B3564A33AFDB37C07E1CE353]]></AD_REFERENCE_VALUE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_VAL_RULE_ID><![CDATA[4DB5167147F24078A1FD39DC7564B48D]]></AD_VAL_RULE_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <COLUMNNAME><![CDATA[fin_financial_account_id]]></COLUMNNAME>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_FINANCIAL_ACCOUNT_ID@ IS NOT NULL AND @FIN_FINANCIAL_ACCOUNT_ID@ <> COALESCE('','-1')) THEN @FIN_FINANCIAL_ACCOUNT_ID@ ELSE (CASE WHEN ((TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@)) > 0) THEN fin_financial_account_id ELSE po_financial_account_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ELEMENT_ID><![CDATA[7891269C840C655DE040007F010155CE]]></AD_ELEMENT_ID>
+<!--D2D748A3C65F4976B4461635A04EFA5F--></AD_PROCESS_PARA>
+
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31--><AD_PROCESS_PARA>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_PARA_ID><![CDATA[DC3ADA42B2C443B79ACD6215AD5D9C31]]></AD_PROCESS_PARA_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <NAME><![CDATA[G/L Item]]></NAME>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DESCRIPTION><![CDATA[An alias for the Account Combination which can be commonly used in daily operations.]]></DESCRIPTION>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <HELP><![CDATA[General ledger item.]]></HELP>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_VALUE_ID><![CDATA[66E310A87A844A51B8BAD2884E996CD6]]></AD_REFERENCE_VALUE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <COLUMNNAME><![CDATA[c_glitem_id]]></COLUMNNAME>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DEFAULTVALUE><![CDATA[@C_GLItem_ID@]]></DEFAULTVALUE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31--></AD_PROCESS_PARA>
+
 <!--E2EB0EFA3CE741C1848590D270CEBE2B--><AD_PROCESS_PARA>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_PROCESS_PARA_ID><![CDATA[E2EB0EFA3CE741C1848590D270CEBE2B]]></AD_PROCESS_PARA_ID>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <NAME><![CDATA[Payment Plan]]></NAME>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <DESCRIPTION><![CDATA[Sales Invoice Payment Plans]]></DESCRIPTION>
-<!--15ECCF8974044A81982F57F9F1E1A67B-->  <HELP><![CDATA[Sales Invoice Payment Plans]]></HELP>
+<!--15ECCF8974044A81982F57F9F1E1A67B-->  <HELP><![CDATA[Sales invoice payment plan information is shown grouped in two sections. ]]></HELP>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <AD_TABLE_ID><![CDATA[CE9AFF5F51B846AEAB0B6CBF829092CD]]></AD_TABLE_ID>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <AD_WINDOW_ID><![CDATA[FC6A51DF5F32451987C0C84D7B338B94]]></AD_WINDOW_ID>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -39,7 +39,7 @@
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <NAME><![CDATA[Accounting History]]></NAME>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <DESCRIPTION><![CDATA[Accounting history]]></DESCRIPTION>
-<!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <HELP><![CDATA[Accounting entries related to the given financial account transaction]]></HELP>
+<!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <HELP><![CDATA[This tab shows the accounting history of a given transaction.]]></HELP>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <AD_TABLE_ID><![CDATA[1BAA61D216CB4A62838AA785658EE092]]></AD_TABLE_ID>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <AD_WINDOW_ID><![CDATA[94EAA455D2644E04AB25D93BE5157B6D]]></AD_WINDOW_ID>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <SEQNO><![CDATA[25]]></SEQNO>
@@ -69,7 +69,7 @@
 <!--2ECAED4620B840BA8DD738140F58A629-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <NAME><![CDATA[Payment Plan]]></NAME>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <DESCRIPTION><![CDATA[Sales Invoice Payment Plans]]></DESCRIPTION>
-<!--2ECAED4620B840BA8DD738140F58A629-->  <HELP><![CDATA[Sales Invoice Payment Plans]]></HELP>
+<!--2ECAED4620B840BA8DD738140F58A629-->  <HELP><![CDATA[Purchase invoice payment plan information is shown grouped in two sections. ]]></HELP>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <AD_TABLE_ID><![CDATA[CE9AFF5F51B846AEAB0B6CBF829092CD]]></AD_TABLE_ID>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <AD_WINDOW_ID><![CDATA[6EFB8443A1C64F3D926CE42A0E40631C]]></AD_WINDOW_ID>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -127,7 +127,7 @@
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <NAME><![CDATA[Payment Plan]]></NAME>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <DESCRIPTION><![CDATA[List of scheduled payments expected against a particular invoice and payment plan associated with that invoice.]]></DESCRIPTION>
-<!--60825C9E68644DBC9C530DDCABE05A6E-->  <HELP><![CDATA[List of scheduled payments expected against an invoice.]]></HELP>
+<!--60825C9E68644DBC9C530DDCABE05A6E-->  <HELP><![CDATA[The payment plan tab lists the scheduled payments expected against the invoice.]]></HELP>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <AD_TABLE_ID><![CDATA[CE9AFF5F51B846AEAB0B6CBF829092CD]]></AD_TABLE_ID>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <AD_WINDOW_ID><![CDATA[167]]></AD_WINDOW_ID>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <SEQNO><![CDATA[45]]></SEQNO>
@@ -182,7 +182,7 @@
 <!--79DFBE24B39742AD877E3163643E619F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--79DFBE24B39742AD877E3163643E619F-->  <NAME><![CDATA[Cleared items]]></NAME>
 <!--79DFBE24B39742AD877E3163643E619F-->  <DESCRIPTION><![CDATA[Cleared transactions]]></DESCRIPTION>
-<!--79DFBE24B39742AD877E3163643E619F-->  <HELP><![CDATA[Transactions which have been cleared in this reconciliation event]]></HELP>
+<!--79DFBE24B39742AD877E3163643E619F-->  <HELP><![CDATA[This tab shows the transactions cleared or set as matched in a reconciliation.]]></HELP>
 <!--79DFBE24B39742AD877E3163643E619F-->  <AD_TABLE_ID><![CDATA[DE2121FA9DC34B2BB1264BB9F7406850]]></AD_TABLE_ID>
 <!--79DFBE24B39742AD877E3163643E619F-->  <AD_WINDOW_ID><![CDATA[94EAA455D2644E04AB25D93BE5157B6D]]></AD_WINDOW_ID>
 <!--79DFBE24B39742AD877E3163643E619F-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -210,7 +210,7 @@
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <NAME><![CDATA[Payment Plan]]></NAME>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <DESCRIPTION><![CDATA[List of scheduled payments expected against a particular invoice and payment plan associated with that invoice.]]></DESCRIPTION>
-<!--7A8D43541F8C49F1BD8A431A0041BF89-->  <HELP><![CDATA[List of scheduled payments expected against an invoice.]]></HELP>
+<!--7A8D43541F8C49F1BD8A431A0041BF89-->  <HELP><![CDATA[The payment plan tab lists the scheduled payments expected against the invoice.]]></HELP>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <AD_TABLE_ID><![CDATA[CE9AFF5F51B846AEAB0B6CBF829092CD]]></AD_TABLE_ID>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <AD_WINDOW_ID><![CDATA[183]]></AD_WINDOW_ID>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <SEQNO><![CDATA[40]]></SEQNO>
@@ -326,7 +326,7 @@
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <NAME><![CDATA[Payment Details]]></NAME>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <DESCRIPTION><![CDATA[List of payment made details against a particular invoice based on the payment in plan..]]></DESCRIPTION>
-<!--9817E22E2536417F8C9AEC8D5FA33E18-->  <HELP><![CDATA[Display the details of the payments received against the invoice.]]></HELP>
+<!--9817E22E2536417F8C9AEC8D5FA33E18-->  <HELP><![CDATA[This tab displays the details of the payments made against the invoice.]]></HELP>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <AD_TABLE_ID><![CDATA[C0233061EA504EFEAB0483E836BBAF31]]></AD_TABLE_ID>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <AD_WINDOW_ID><![CDATA[183]]></AD_WINDOW_ID>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -356,7 +356,7 @@
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <NAME><![CDATA[Payment Plan (old)]]></NAME>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <DESCRIPTION><![CDATA[List of scheduled payments in expected against a particular invoice and payment plan associated with that invoice.]]></DESCRIPTION>
-<!--A94442B27F664A41BF64735DFA76FB4D-->  <HELP><![CDATA[List of the scheduled payments expected against the invoice.]]></HELP>
+<!--A94442B27F664A41BF64735DFA76FB4D-->  <HELP><![CDATA[The payment plan tab lists the scheduled payments expected against the invoice.]]></HELP>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <AD_TABLE_ID><![CDATA[77182DC88AA842D499C01FB0BAE39561]]></AD_TABLE_ID>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <AD_WINDOW_ID><![CDATA[183]]></AD_WINDOW_ID>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <SEQNO><![CDATA[32]]></SEQNO>
@@ -524,7 +524,7 @@
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <NAME><![CDATA[Payment Details]]></NAME>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <DESCRIPTION><![CDATA[List of payment made details against a particular invoice based on the payment in plan..]]></DESCRIPTION>
-<!--F6C2283A21314407BBBB23FF14B85ED4-->  <HELP><![CDATA[Display the details of the payments received against the invoice.]]></HELP>
+<!--F6C2283A21314407BBBB23FF14B85ED4-->  <HELP><![CDATA[This tab displays the details of the payments made against the invoice.]]></HELP>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <AD_TABLE_ID><![CDATA[C0233061EA504EFEAB0483E836BBAF31]]></AD_TABLE_ID>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <AD_WINDOW_ID><![CDATA[167]]></AD_WINDOW_ID>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <SEQNO><![CDATA[46]]></SEQNO>
@@ -554,7 +554,7 @@
 <!--F9751D712A804D57B97A36803843F2D7-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--F9751D712A804D57B97A36803843F2D7-->  <NAME><![CDATA[Payment Details (old)]]></NAME>
 <!--F9751D712A804D57B97A36803843F2D7-->  <DESCRIPTION><![CDATA[List of payments made details against a particular invoice based on the payment plan]]></DESCRIPTION>
-<!--F9751D712A804D57B97A36803843F2D7-->  <HELP><![CDATA[Display the details of the payments made against the invoice.]]></HELP>
+<!--F9751D712A804D57B97A36803843F2D7-->  <HELP><![CDATA[This tab displays the details of the payments made against the invoice.]]></HELP>
 <!--F9751D712A804D57B97A36803843F2D7-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
 <!--F9751D712A804D57B97A36803843F2D7-->  <AD_WINDOW_ID><![CDATA[183]]></AD_WINDOW_ID>
 <!--F9751D712A804D57B97A36803843F2D7-->  <SEQNO><![CDATA[33]]></SEQNO>
@@ -636,6 +636,7 @@
 <!--FF8080812F213146012F2135BC25000E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812F213146012F2135BC25000E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812F213146012F2135BC25000E-->  <NAME><![CDATA[Transaction]]></NAME>
+<!--FF8080812F213146012F2135BC25000E-->  <HELP><![CDATA[The transaction tab lists all the deposit and withdrawal transactions of the financial account.]]></HELP>
 <!--FF8080812F213146012F2135BC25000E-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
 <!--FF8080812F213146012F2135BC25000E-->  <AD_WINDOW_ID><![CDATA[94EAA455D2644E04AB25D93BE5157B6D]]></AD_WINDOW_ID>
 <!--FF8080812F213146012F2135BC25000E-->  <SEQNO><![CDATA[21]]></SEQNO>
@@ -663,7 +664,7 @@
 <!--FF80808130BB89090130BB9A3A2B0043-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <NAME><![CDATA[Accounting]]></NAME>
-<!--FF80808130BB89090130BB9A3A2B0043-->  <HELP><![CDATA[Accounting History for the given financial account]]></HELP>
+<!--FF80808130BB89090130BB9A3A2B0043-->  <HELP><![CDATA[The accounting tab is a read-only tab which showa every financial account transaction posting.]]></HELP>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <AD_TABLE_ID><![CDATA[FF80808130BB89090130BB8E3D7E0012]]></AD_TABLE_ID>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <AD_WINDOW_ID><![CDATA[94EAA455D2644E04AB25D93BE5157B6D]]></AD_WINDOW_ID>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -692,6 +693,7 @@
 <!--FF8080813320657F0133209DE21B0042-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813320657F0133209DE21B0042-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813320657F0133209DE21B0042-->  <NAME><![CDATA[Reconciliations]]></NAME>
+<!--FF8080813320657F0133209DE21B0042-->  <HELP><![CDATA[The reconciliation tab shows the reconciliations created manually if no matching algorithm is assigned to the financial account as well as the ones created while matching an imported bank statement file otherwise.]]></HELP>
 <!--FF8080813320657F0133209DE21B0042-->  <AD_TABLE_ID><![CDATA[B1B7075C46934F0A9FD4C4D0F1457B42]]></AD_TABLE_ID>
 <!--FF8080813320657F0133209DE21B0042-->  <AD_WINDOW_ID><![CDATA[94EAA455D2644E04AB25D93BE5157B6D]]></AD_WINDOW_ID>
 <!--FF8080813320657F0133209DE21B0042-->  <SEQNO><![CDATA[55]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -88,6 +88,17 @@
 <!--0E2A728824A24A2995EC050F8096BAD0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--0E2A728824A24A2995EC050F8096BAD0--></AD_TEXTINTERFACES>
 
+<!--0F6DD423E58F4AF3B19EE1C69E58280F--><AD_TEXTINTERFACES>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <AD_TEXTINTERFACES_ID><![CDATA[0F6DD423E58F4AF3B19EE1C69E58280F]]></AD_TEXTINTERFACES_ID>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <TEXT><![CDATA[1st Dimension]]></TEXT>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--0F6DD423E58F4AF3B19EE1C69E58280F--></AD_TEXTINTERFACES>
+
 <!--1053F842DA714DA499EAB367A22D82DD--><AD_TEXTINTERFACES>
 <!--1053F842DA714DA499EAB367A22D82DD-->  <AD_TEXTINTERFACES_ID><![CDATA[1053F842DA714DA499EAB367A22D82DD]]></AD_TEXTINTERFACES_ID>
 <!--1053F842DA714DA499EAB367A22D82DD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -473,6 +484,17 @@
 <!--42D825B3AF15493BA1ACD859E190CE8D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--42D825B3AF15493BA1ACD859E190CE8D--></AD_TEXTINTERFACES>
 
+<!--43D5104886C345889044DB56D90CA018--><AD_TEXTINTERFACES>
+<!--43D5104886C345889044DB56D90CA018-->  <AD_TEXTINTERFACES_ID><![CDATA[43D5104886C345889044DB56D90CA018]]></AD_TEXTINTERFACES_ID>
+<!--43D5104886C345889044DB56D90CA018-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--43D5104886C345889044DB56D90CA018-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--43D5104886C345889044DB56D90CA018-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--43D5104886C345889044DB56D90CA018-->  <TEXT><![CDATA[1st Dimension]]></TEXT>
+<!--43D5104886C345889044DB56D90CA018-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html]]></FILENAME>
+<!--43D5104886C345889044DB56D90CA018-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--43D5104886C345889044DB56D90CA018-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--43D5104886C345889044DB56D90CA018--></AD_TEXTINTERFACES>
+
 <!--43DFC2838E21415198EC21A0BAB398C2--><AD_TEXTINTERFACES>
 <!--43DFC2838E21415198EC21A0BAB398C2-->  <AD_TEXTINTERFACES_ID><![CDATA[43DFC2838E21415198EC21A0BAB398C2]]></AD_TEXTINTERFACES_ID>
 <!--43DFC2838E21415198EC21A0BAB398C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -671,6 +693,17 @@
 <!--642A1A00F883467C95A69612A6F73C90-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--642A1A00F883467C95A69612A6F73C90--></AD_TEXTINTERFACES>
 
+<!--665A5D16B1CC42A09307F8321C489D60--><AD_TEXTINTERFACES>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <AD_TEXTINTERFACES_ID><![CDATA[665A5D16B1CC42A09307F8321C489D60]]></AD_TEXTINTERFACES_ID>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <TEXT><![CDATA[2nd Dimension]]></TEXT>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html]]></FILENAME>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--665A5D16B1CC42A09307F8321C489D60-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--665A5D16B1CC42A09307F8321C489D60--></AD_TEXTINTERFACES>
+
 <!--667D14BAF0EA47AB8E81C911C4059D02--><AD_TEXTINTERFACES>
 <!--667D14BAF0EA47AB8E81C911C4059D02-->  <AD_TEXTINTERFACES_ID><![CDATA[667D14BAF0EA47AB8E81C911C4059D02]]></AD_TEXTINTERFACES_ID>
 <!--667D14BAF0EA47AB8E81C911C4059D02-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -814,6 +847,17 @@
 <!--6FA59F20F1FE456C96EF35A22793F455-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--6FA59F20F1FE456C96EF35A22793F455--></AD_TEXTINTERFACES>
 
+<!--704B0588F8E64A3FB6F627E802709985--><AD_TEXTINTERFACES>
+<!--704B0588F8E64A3FB6F627E802709985-->  <AD_TEXTINTERFACES_ID><![CDATA[704B0588F8E64A3FB6F627E802709985]]></AD_TEXTINTERFACES_ID>
+<!--704B0588F8E64A3FB6F627E802709985-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--704B0588F8E64A3FB6F627E802709985-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--704B0588F8E64A3FB6F627E802709985-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--704B0588F8E64A3FB6F627E802709985-->  <TEXT><![CDATA[2nd Dimension]]></TEXT>
+<!--704B0588F8E64A3FB6F627E802709985-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--704B0588F8E64A3FB6F627E802709985-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--704B0588F8E64A3FB6F627E802709985-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--704B0588F8E64A3FB6F627E802709985--></AD_TEXTINTERFACES>
+
 <!--70BDF609561E4BB984D845BFCEB39D0B--><AD_TEXTINTERFACES>
 <!--70BDF609561E4BB984D845BFCEB39D0B-->  <AD_TEXTINTERFACES_ID><![CDATA[70BDF609561E4BB984D845BFCEB39D0B]]></AD_TEXTINTERFACES_ID>
 <!--70BDF609561E4BB984D845BFCEB39D0B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1331,6 +1375,17 @@
 <!--84148404EF5F406CAF4066482D532044-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--84148404EF5F406CAF4066482D532044--></AD_TEXTINTERFACES>
 
+<!--847A0A37B7084A7F8D7A5C872E63EC48--><AD_TEXTINTERFACES>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <AD_TEXTINTERFACES_ID><![CDATA[847A0A37B7084A7F8D7A5C872E63EC48]]></AD_TEXTINTERFACES_ID>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <TEXT><![CDATA[2nd Dimension]]></TEXT>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--847A0A37B7084A7F8D7A5C872E63EC48-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--847A0A37B7084A7F8D7A5C872E63EC48--></AD_TEXTINTERFACES>
+
 <!--84AD152C2958082CE040007F01006D2B--><AD_TEXTINTERFACES>
 <!--84AD152C2958082CE040007F01006D2B-->  <AD_TEXTINTERFACES_ID><![CDATA[84AD152C2958082CE040007F01006D2B]]></AD_TEXTINTERFACES_ID>
 <!--84AD152C2958082CE040007F01006D2B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1441,6 +1496,17 @@
 <!--8549502AAE224052E040007F0101680D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--8549502AAE224052E040007F0101680D--></AD_TEXTINTERFACES>
 
+<!--855CF9A849804FA78F7126D544003B73--><AD_TEXTINTERFACES>
+<!--855CF9A849804FA78F7126D544003B73-->  <AD_TEXTINTERFACES_ID><![CDATA[855CF9A849804FA78F7126D544003B73]]></AD_TEXTINTERFACES_ID>
+<!--855CF9A849804FA78F7126D544003B73-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--855CF9A849804FA78F7126D544003B73-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--855CF9A849804FA78F7126D544003B73-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--855CF9A849804FA78F7126D544003B73-->  <TEXT><![CDATA[Cost Center]]></TEXT>
+<!--855CF9A849804FA78F7126D544003B73-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html]]></FILENAME>
+<!--855CF9A849804FA78F7126D544003B73-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--855CF9A849804FA78F7126D544003B73-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--855CF9A849804FA78F7126D544003B73--></AD_TEXTINTERFACES>
+
 <!--85718201D5AFB0ADE040007F01006455--><AD_TEXTINTERFACES>
 <!--85718201D5AFB0ADE040007F01006455-->  <AD_TEXTINTERFACES_ID><![CDATA[85718201D5AFB0ADE040007F01006455]]></AD_TEXTINTERFACES_ID>
 <!--85718201D5AFB0ADE040007F01006455-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2123,6 +2189,17 @@
 <!--A4F91D28E3AB4C0EA9ACCA40899141C3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--A4F91D28E3AB4C0EA9ACCA40899141C3--></AD_TEXTINTERFACES>
 
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9--><AD_TEXTINTERFACES>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <AD_TEXTINTERFACES_ID><![CDATA[A5CB9563E5BE40DB8C637BB02E3BB0C9]]></AD_TEXTINTERFACES_ID>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <TEXT><![CDATA[1st Dimension]]></TEXT>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--A5CB9563E5BE40DB8C637BB02E3BB0C9--></AD_TEXTINTERFACES>
+
 <!--A8C9A7A0B28D4C94B22CD692E33136CC--><AD_TEXTINTERFACES>
 <!--A8C9A7A0B28D4C94B22CD692E33136CC-->  <AD_TEXTINTERFACES_ID><![CDATA[A8C9A7A0B28D4C94B22CD692E33136CC]]></AD_TEXTINTERFACES_ID>
 <!--A8C9A7A0B28D4C94B22CD692E33136CC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2464,6 +2541,17 @@
 <!--C0CF683DDC1B46AD91012C5B5B4BAE89-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--C0CF683DDC1B46AD91012C5B5B4BAE89--></AD_TEXTINTERFACES>
 
+<!--C2A63BAD18D247A7B182E47EED538C68--><AD_TEXTINTERFACES>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <AD_TEXTINTERFACES_ID><![CDATA[C2A63BAD18D247A7B182E47EED538C68]]></AD_TEXTINTERFACES_ID>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <TEXT><![CDATA[Cost Center]]></TEXT>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--C2A63BAD18D247A7B182E47EED538C68-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--C2A63BAD18D247A7B182E47EED538C68--></AD_TEXTINTERFACES>
+
 <!--C30DED63010C4E8EB54E25E5881A8226--><AD_TEXTINTERFACES>
 <!--C30DED63010C4E8EB54E25E5881A8226-->  <AD_TEXTINTERFACES_ID><![CDATA[C30DED63010C4E8EB54E25E5881A8226]]></AD_TEXTINTERFACES_ID>
 <!--C30DED63010C4E8EB54E25E5881A8226-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2552,6 +2640,17 @@
 <!--CB1E94F8B2914BEF88FF72433F962F5A-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--CB1E94F8B2914BEF88FF72433F962F5A--></AD_TEXTINTERFACES>
 
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9--><AD_TEXTINTERFACES>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <AD_TEXTINTERFACES_ID><![CDATA[CBDEB0ED5BAF4E0B8267A4DECC8CC7D9]]></AD_TEXTINTERFACES_ID>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <TEXT><![CDATA[Cost Center]]></TEXT>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--CBDEB0ED5BAF4E0B8267A4DECC8CC7D9--></AD_TEXTINTERFACES>
+
 <!--CE2DB3A92796496FB681075E787506CE--><AD_TEXTINTERFACES>
 <!--CE2DB3A92796496FB681075E787506CE-->  <AD_TEXTINTERFACES_ID><![CDATA[CE2DB3A92796496FB681075E787506CE]]></AD_TEXTINTERFACES_ID>
 <!--CE2DB3A92796496FB681075E787506CE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -22,6 +22,17 @@
 <!--29010995FD39439D97A5C0CE8CE27D70-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--29010995FD39439D97A5C0CE8CE27D70--></AD_VAL_RULE>
 
+<!--4DB5167147F24078A1FD39DC7564B48D--><AD_VAL_RULE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_VAL_RULE_ID><![CDATA[4DB5167147F24078A1FD39DC7564B48D]]></AD_VAL_RULE_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <NAME><![CDATA[FIN_FinancialAccountInNaturalTree]]></NAME>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <TYPE><![CDATA[S]]></TYPE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')]]></CODE>
+<!--4DB5167147F24078A1FD39DC7564B48D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4DB5167147F24078A1FD39DC7564B48D--></AD_VAL_RULE>
+
 <!--575E470ABADB4C278132C957A78C47E3--><AD_VAL_RULE>
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_VAL_RULE_ID><![CDATA[575E470ABADB4C278132C957A78C47E3]]></AD_VAL_RULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -33,6 +44,48 @@
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3--></AD_VAL_RULE>
 
+<!--959ADF046AFE4F509ABC6E2F41F9DB04--><AD_VAL_RULE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccountOrBPartnerAcc]]></NAME>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <TYPE><![CDATA[S]]></TYPE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <CODE><![CDATA[EXISTS(
+SELECT FIN_PAYMENTMETHOD_ID 
+FROM FIN_FINACC_PAYMENTMETHOD 
+WHERE FIN_FINANCIAL_ACCOUNT_ID = CASE WHEN (@FIN_FINANCIAL_ACCOUNT_ID@ IS NOT NULL AND @FIN_FINANCIAL_ACCOUNT_ID@ <> COALESCE('','-1')) THEN @FIN_FINANCIAL_ACCOUNT_ID@ ELSE
+(SELECT CASE WHEN ((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) > 0) THEN FIN_FINANCIAL_ACCOUNT_ID ELSE PO_FINANCIAL_ACCOUNT_ID END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@)
+END
+AND FIN_FINACC_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID = FIN_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID )]]></CODE>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04--></AD_VAL_RULE>
+
+<!--BE0A211D552A4DE8AC3E6658759B396F--><AD_VAL_RULE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_VAL_RULE_ID><![CDATA[BE0A211D552A4DE8AC3E6658759B396F]]></AD_VAL_RULE_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccount]]></NAME>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <TYPE><![CDATA[S]]></TYPE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <CODE><![CDATA[EXISTS (SELECT FIN_PAYMENTMETHOD_ID 
+FROM FIN_FINACC_PAYMENTMETHOD 
+WHERE FIN_FINANCIAL_ACCOUNT_ID = @FIN_FINANCIAL_ACCOUNT_ID@ 
+AND FIN_FINACC_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID = FIN_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID)]]></CODE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F--></AD_VAL_RULE>
+
+<!--D035365830AF466BA81F2AB8ECC6FAE0--><AD_VAL_RULE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <NAME><![CDATA[FIN_GLItemInNaturalTree]]></NAME>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <TYPE><![CDATA[S]]></TYPE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')]]></CODE>
+<!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--D035365830AF466BA81F2AB8ECC6FAE0--></AD_VAL_RULE>
+
 <!--E00B19370995405C8014D48E2DE98FD1--><AD_VAL_RULE>
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_VAL_RULE_ID><![CDATA[E00B19370995405C8014D48E2DE98FD1]]></AD_VAL_RULE_ID>
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -45,6 +98,20 @@
 <!--E00B19370995405C8014D48E2DE98FD1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E00B19370995405C8014D48E2DE98FD1--></AD_VAL_RULE>
 
+<!--E491153CCBEE49A1842A7CC8544929DD--><AD_VAL_RULE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_VAL_RULE_ID><![CDATA[E491153CCBEE49A1842A7CC8544929DD]]></AD_VAL_RULE_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <NAME><![CDATA[FIN_BusinessPartnerInNaturaTreeAndCustomerOrVendor]]></NAME>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <TYPE><![CDATA[S]]></TYPE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <CODE><![CDATA[(AD_ISORGINCLUDED(ad_org_id, @AD_ORG_ID@, ad_client_id)<>'-1'  OR AD_ISORGINCLUDED(@AD_ORG_ID@, ad_org_id, ad_client_id)<>'-1')
+AND ((((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) > 0) AND (ISCUSTOMER = 'Y' OR C_BPARTNER_ID = @C_BPARTNER_ID@))
+OR  (((TO_NUMBER(@AMTACCTDR@) - TO_NUMBER(@AMTACCTCR@)) < 0) AND (ISVENDOR = 'Y' OR C_BPARTNER_ID = @C_BPARTNER_ID@)))
+]]></CODE>
+<!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E491153CCBEE49A1842A7CC8544929DD--></AD_VAL_RULE>
+
 <!--FF8080812E448A62012E44943A160017--><AD_VAL_RULE>
 <!--FF8080812E448A62012E44943A160017-->  <AD_VAL_RULE_ID><![CDATA[FF8080812E448A62012E44943A160017]]></AD_VAL_RULE_ID>
 <!--FF8080812E448A62012E44943A160017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_WINDOW.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_WINDOW.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <NAME><![CDATA[Purchase Invoice Payment Plan]]></NAME>
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <DESCRIPTION><![CDATA[Displays all Invoice Payment Plans for purchase transactions which are not fully paid]]></DESCRIPTION>
-<!--6EFB8443A1C64F3D926CE42A0E40631C-->  <HELP><![CDATA[Displays all Invoice Payment Plans for purchase transactions which are not fully paid]]></HELP>
+<!--6EFB8443A1C64F3D926CE42A0E40631C-->  <HELP><![CDATA[The purchase invoice payment plan window displays all the purchase invoice payment plans which are not fully paid. ]]></HELP>
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <WINDOWTYPE><![CDATA[T]]></WINDOWTYPE>
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <ISSOTRX><![CDATA[N]]></ISSOTRX>
 <!--6EFB8443A1C64F3D926CE42A0E40631C-->  <PROCESSING><![CDATA[N]]></PROCESSING>
@@ -70,7 +70,7 @@
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <NAME><![CDATA[Sales Invoice Payment Plan]]></NAME>
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <DESCRIPTION><![CDATA[Displays all Invoice Payment Plans for sales transactions which are not fully paid]]></DESCRIPTION>
-<!--FC6A51DF5F32451987C0C84D7B338B94-->  <HELP><![CDATA[Displays all Invoice Payment Plans for sales transactions which are not fully paid]]></HELP>
+<!--FC6A51DF5F32451987C0C84D7B338B94-->  <HELP><![CDATA[The sales invoice payment plan window displays all the sales invoice payment plans which are not fully paid. ]]></HELP>
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <WINDOWTYPE><![CDATA[T]]></WINDOWTYPE>
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
 <!--FC6A51DF5F32451987C0C84D7B338B94-->  <PROCESSING><![CDATA[N]]></PROCESSING>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration_data.xsql	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration_data.xsql	Wed Dec 12 11:19:29 2012 +0100
@@ -63,6 +63,7 @@
       where ad_reference_id = '183'
       and ad_ref_list.isactive='Y'
       and c_period.c_year_id = c_year.c_year_id
+      and c_period.periodtype <> 'A'
       and c_calendar_id = (select c_calendar_id from ad_org
             where ad_org_id = ad_org_getcalendarowner(a.ad_org_id))
       and not exists (select 1 from c_periodcontrol
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.java	Wed Dec 12 11:19:29 2012 +0100
@@ -30,23 +30,23 @@
   }
 
   public String getField(String fieldName) {
-    if (fieldName.equalsIgnoreCase("C_ACCTSCHEMA_ID") || fieldName.equals("cAcctschemaId"))
+    if (fieldName.equalsIgnoreCase("c_acctschema_id") || fieldName.equals("cAcctschemaId"))
       return cAcctschemaId;
-    else if (fieldName.equalsIgnoreCase("AD_CLIENT_ID") || fieldName.equals("adClientId"))
+    else if (fieldName.equalsIgnoreCase("ad_client_id") || fieldName.equals("adClientId"))
       return adClientId;
-    else if (fieldName.equalsIgnoreCase("AD_ORG_ID") || fieldName.equals("adOrgId"))
+    else if (fieldName.equalsIgnoreCase("ad_org_id") || fieldName.equals("adOrgId"))
       return adOrgId;
-    else if (fieldName.equalsIgnoreCase("AD_TABLE_ID") || fieldName.equals("adTableId"))
+    else if (fieldName.equalsIgnoreCase("ad_table_id") || fieldName.equals("adTableId"))
       return adTableId;
-    else if (fieldName.equalsIgnoreCase("NAME"))
+    else if (fieldName.equalsIgnoreCase("name"))
       return name;
-    else if (fieldName.equalsIgnoreCase("C_PERIOD_ID") || fieldName.equals("cPeriodId"))
+    else if (fieldName.equalsIgnoreCase("c_period_id") || fieldName.equals("cPeriodId"))
       return cPeriodId;
-    else if (fieldName.equalsIgnoreCase("VALUE"))
+    else if (fieldName.equalsIgnoreCase("value"))
       return value;
-    else if (fieldName.equalsIgnoreCase("STATUS"))
+    else if (fieldName.equalsIgnoreCase("status"))
       return status;
-    else if (fieldName.equalsIgnoreCase("ISDEFAULTACCT"))
+    else if (fieldName.equalsIgnoreCase("isdefaultacct"))
       return isdefaultacct;
    else {
      log4j.debug("Field does not exist: " + fieldName);
@@ -83,15 +83,15 @@
       while(continueResult && result.next()) {
         countRecord++;
         CreateAccountingConfigurationData objectCreateAccountingConfigurationData = new CreateAccountingConfigurationData();
-        objectCreateAccountingConfigurationData.cAcctschemaId = UtilSql.getValue(result, "C_ACCTSCHEMA_ID");
-        objectCreateAccountingConfigurationData.adClientId = UtilSql.getValue(result, "AD_CLIENT_ID");
-        objectCreateAccountingConfigurationData.adOrgId = UtilSql.getValue(result, "AD_ORG_ID");
-        objectCreateAccountingConfigurationData.adTableId = UtilSql.getValue(result, "AD_TABLE_ID");
-        objectCreateAccountingConfigurationData.name = UtilSql.getValue(result, "NAME");
-        objectCreateAccountingConfigurationData.cPeriodId = UtilSql.getValue(result, "C_PERIOD_ID");
-        objectCreateAccountingConfigurationData.value = UtilSql.getValue(result, "VALUE");
-        objectCreateAccountingConfigurationData.status = UtilSql.getValue(result, "STATUS");
-        objectCreateAccountingConfigurationData.isdefaultacct = UtilSql.getValue(result, "ISDEFAULTACCT");
+        objectCreateAccountingConfigurationData.cAcctschemaId = UtilSql.getValue(result, "c_acctschema_id");
+        objectCreateAccountingConfigurationData.adClientId = UtilSql.getValue(result, "ad_client_id");
+        objectCreateAccountingConfigurationData.adOrgId = UtilSql.getValue(result, "ad_org_id");
+        objectCreateAccountingConfigurationData.adTableId = UtilSql.getValue(result, "ad_table_id");
+        objectCreateAccountingConfigurationData.name = UtilSql.getValue(result, "name");
+        objectCreateAccountingConfigurationData.cPeriodId = UtilSql.getValue(result, "c_period_id");
+        objectCreateAccountingConfigurationData.value = UtilSql.getValue(result, "value");
+        objectCreateAccountingConfigurationData.status = UtilSql.getValue(result, "status");
+        objectCreateAccountingConfigurationData.isdefaultacct = UtilSql.getValue(result, "isdefaultacct");
         objectCreateAccountingConfigurationData.InitRecordNumber = Integer.toString(firstRegister);
         vector.addElement(objectCreateAccountingConfigurationData);
         if (countRecord >= numberRegisters && numberRegisters != 0) {
@@ -136,7 +136,7 @@
 
       result = st.executeQuery();
       if(result.next()) {
-        boolReturn = !UtilSql.getValue(result, "NAME").equals("0");
+        boolReturn = !UtilSql.getValue(result, "name").equals("0");
       }
       result.close();
     } catch(SQLException e){
@@ -207,6 +207,7 @@
       "      where ad_reference_id = '183'" +
       "      and ad_ref_list.isactive='Y'" +
       "      and c_period.c_year_id = c_year.c_year_id" +
+      "      and c_period.periodtype <> 'A'" +
       "      and c_calendar_id = (select c_calendar_id from ad_org" +
       "            where ad_org_id = ad_org_getcalendarowner(a.ad_org_id))" +
       "      and not exists (select 1 from c_periodcontrol" +
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Dec 12 11:19:29 2012 +0100
@@ -102,7 +102,7 @@
       outstandingAmount = frm.elements["inpRecordAmt" + scheduledPaymentDetailId].value;
       if (chk[i].checked && keepSelection) {
         if(compare(outstandingAmount, '<', amount) && compare(distributedAmount, '==', outstandingAmount))
-    	  continue;
+          continue;
         else
           amount = add(amount, frm.elements["inpPaymentAmount" + chk[i].value].value);
       }
@@ -216,7 +216,7 @@
       glitemCount = OB.APRM.APFT_GLItems.length,
       glitemAmount = 0,
       glitemDescLength = 20, glitemDescCont = "...",
-      cellCount, row, cellGLItemDesc, cellGLITemReceivedInAmt, cellGLITemPaidOutAmt, cellRemoveButton, i, textNode, glAcctDimsDesc, acctDim, cellGLItemDim, cellText;
+      cellCount, row, cellGLItemDesc, cellGLITemReceivedInAmt, cellGLITemPaidOutAmt, cellRemoveButton, i, textNode, glAcctDimsDesc, glAcctDimsDescnext, acctDim, cellGLItemDim, cellText;
 
   setTextContent(table,'');
   if (!OB.APRM.HasGLItems) {
@@ -255,13 +255,15 @@
     cellCount = 0;
     
     cellGLItemDesc = row.insertCell(cellCount);
+    cellGLItemDesc.rowSpan = "2";
     textNode = document.createTextNode(OB.APRM.APFT_GLItems[i].glitemDesc);
     cellGLItemDesc.appendChild(textNode);
     cellGLItemDesc.className = 'DataGrid_Body_Cell';
     cellCount++;
     
     // Accounting Dimensions
-    glAcctDimsDesc = ["cBpartnerDimDesc", "cActivityDimDesc", "mProductDimDesc", "cCampaignDimDesc", "cProjectDimDesc", "cSalesregionDimDesc"];
+    glAcctDimsDesc = ["cBpartnerDimDesc", "cActivityDimDesc", "mProductDimDesc", "cCampaignDimDesc"];
+    glAcctDimsDescnext = ["cProjectDimDesc", "cCostcenterDimDesc", "user1DimDesc", "user2DimDesc"];
     for (acctDim = 0; acctDim < glAcctDimsDesc.length; acctDim++) {
       if (OB.APRM.APFT_GLItems[i][glAcctDimsDesc[acctDim]]) {
         cellGLItemDim = row.insertCell(cellCount);
@@ -287,9 +289,11 @@
     textNode = document.createTextNode(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemReceivedInAmt));
     cellGLITemReceivedInAmt.appendChild(textNode);
     cellGLITemReceivedInAmt.className = 'DataGrid_Body_Cell_Amount';
+    cellGLITemReceivedInAmt.rowSpan = "2";
     cellCount++;
     
     cellGLITemPaidOutAmt = row.insertCell(cellCount);
+    cellGLITemPaidOutAmt.rowSpan = "2";
     textNode = document.createTextNode(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemPaidOutAmt));
     cellGLITemPaidOutAmt.appendChild(textNode);
     cellGLITemPaidOutAmt.className = 'DataGrid_Body_Cell_Amount';
@@ -301,6 +305,7 @@
       glitemAmount = subtract(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemPaidOutAmt), applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemReceivedInAmt));
     }
     cellRemoveButton = row.insertCell(cellCount);
+    cellRemoveButton.rowSpan = "2";
     cellText = '<div><button type="button" id="buttonRemoveGLItem"'
         + ' class="ButtonLink_focus" onclick="removeGLItem(' + i + ', ' + applyFormatOBMaskedToJS(glitemAmount) + ');return false;"'
         + ' onfocus="buttonEvent(\'onfocus\', this); window.status=\'OK\'; return true;"'
@@ -316,6 +321,31 @@
         + '    <img alt="Remove" title="Remove" src="../web/org.openbravo.advpaymentmngt/images/GLItemGridCancel-xButt.png" id="imgButtonRemove" border="0"/></td>'
         + '  </tr></table></button></div>';
     setTextContent(cellRemoveButton, cellText);
+
+    row = table.insertRow(table.rows.length);
+    row.className = 'DataGrid_Body_Row DataGrid_Body_Row_'+i%2;
+    cellCount = 0;
+
+    for (acctDim = 0; acctDim < glAcctDimsDescnext.length; acctDim++) {
+        if (OB.APRM.APFT_GLItems[i][glAcctDimsDescnext[acctDim]]) {
+            cellGLItemDim = row.insertCell(cellCount);
+            if (OB.APRM.APFT_GLItems[i][glAcctDimsDescnext[acctDim]].length > glitemDescLength + glitemDescCont.length) {
+              textNode = document.createTextNode(OB.APRM.APFT_GLItems[i][glAcctDimsDescnext[acctDim]].slice(0, glitemDescLength) + glitemDescCont);
+            } else {
+              textNode = document.createTextNode(OB.APRM.APFT_GLItems[i][glAcctDimsDescnext[acctDim]]);
+            }
+            cellGLItemDim.appendChild(textNode);
+            cellGLItemDim.className = 'DataGrid_Body_Cell';
+            cellCount++;
+          } else if (OB.APRM.APFT_GLItems[i][glAcctDimsDescnext[acctDim].replace("Desc", "Displayed")]) {
+            // The Acct. Dimen is displayed and the user has left it empty
+            cellGLItemDim = row.insertCell(cellCount);
+            textNode = document.createTextNode("");
+            cellGLItemDim.appendChild(textNode);
+            cellGLItemDim.className = 'DataGrid_Body_Cell';
+            cellCount++;
+          }
+        }
   }
   updateTotal();
 }
@@ -377,9 +407,15 @@
     cProjectDim: frm.inpCProjectId && frm.inpCProjectId.value,
     cProjectDimDesc: sc_C_Project_ID.selectorField.getDisplayValue(),
     cProjectDimDisplayed: frm.strElement_PJ.value,
-    cSalesregionDim: frm.inpCSalesRegionId && frm.inpCSalesRegionId.value,
-    cSalesregionDimDesc: sc_C_SalesRegion_ID.selectorField.getDisplayValue(),
-    cSalesregionDimDisplayed: frm.strElement_SR.value,
+    cCostcenterDim: frm.inpCCostcenterId && frm.inpCCostcenterId.value,
+    cCostcenterDimDesc: sc_C_Costcenter_ID.selectorField.getDisplayValue(),
+    cCostcenterDimDisplayed: frm.strElement_CC.value,
+    user1Dim: frm.inpUser1Id && frm.inpUser1Id.value,
+    user1DimDesc: sc_User1_ID.selectorField.getDisplayValue(),
+    user1DimDisplayed: frm.strElement_U1.value,
+    user2Dim: frm.inpUser2Id && frm.inpUser2Id.value,
+    user2DimDesc: sc_User2_ID.selectorField.getDisplayValue(),
+    user2DimDisplayed: frm.strElement_U2.value,
     glitemReceivedInAmt: OB.Utilities.Number.OBMaskedToJS(frm.inpGLItemReceivedInAmount.value,
                                                           getGlobalDecSeparator(),
                                                           getGlobalGroupSeparator()),
@@ -624,11 +660,23 @@
   } else {
     displayLogicDimension('c_project_id', false);
   }
-  if (document.frmMain.strElement_SR.value === 'Y' && isDisplayed) {
-    displayLogicDimension('c_salesregion_id', true);
+  if (document.frmMain.strElement_CC.value === 'Y' && isDisplayed) {
+    displayLogicDimension('c_costcenter_id', true);
     displayTitle = true;
   } else {
-    displayLogicDimension('c_salesregion_id', false);
+    displayLogicDimension('c_costcenter_id', false);
+  }
+  if (document.frmMain.strElement_U1.value === 'Y' && isDisplayed) {
+    displayLogicDimension('user1_id', true);
+    displayTitle = true;
+  } else {
+    displayLogicDimension('user1_id', false);
+  }
+  if (document.frmMain.strElement_U2.value === 'Y' && isDisplayed) {
+    displayLogicDimension('user2_id', true);
+    displayTitle = true;
+  } else {
+    displayLogicDimension('user2_id', false);
   }
   
   if (displayTitle) {
@@ -775,8 +823,10 @@
   <input type="hidden" name="strElement_PR" id="paramStrElement_PR" value=""/>
   <input type="hidden" name="strElement_PJ" id="paramStrElement_PJ" value=""/>
   <input type="hidden" name="strElement_AY" id="paramStrElement_AY" value=""/>
-  <input type="hidden" name="strElement_SR" id="paramStrElement_SR" value=""/>
+  <input type="hidden" name="strElement_CC" id="paramStrElement_CC" value=""/>
   <input type="hidden" name="strElement_MC" id="paramStrElement_MC" value=""/>
+  <input type="hidden" name="strElement_U1" id="paramStrElement_U1" value=""/>
+  <input type="hidden" name="strElement_U2" id="paramStrElement_U2" value=""/>
   <input type="hidden" name="strNotAllowExchange" id="paramStrNotAllowExchange" value=""/>
   <input type="hidden" name="strWriteOffLimit" id="paramStrWriteOffLimit" value=""/>
   <input type="hidden" name="strtypewriteoff" id="paramStrtypewriteoff" value=""/>
@@ -1416,15 +1466,44 @@
                   </tr>
                 </table>
               </td>
-              <!-- Sales Region Dimension -->
-              <td id="c_salesregion_id_dim_label" class="TitleCell"><span class="LabelText">Sales Region</span></td>
-              <td id="c_salesregion_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+              <!-- Cost center Dimension -->
+              <td id="c_costcenter_id_dim_label" class="TitleCell"><span class="LabelText">Cost Center</span></td>
+              <td id="c_costcenter_id_dim_inp" class="TextBox_ContentCell" colspan="1">
                 <table style="border:0px;border-collapse:collapse;">
                   <tr>
                     <td style="padding-top: 0px;">
-                      <script>var sc_C_SalesRegion_ID = null;</script>
-                      <input type="hidden" name="inpCSalesRegionId" id="C_SalesRegion_ID" value="" onreset="sc_C_SalesRegion_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_SalesRegion_ID.selectorField);"></input>
-                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D8EE5430054?columnName=C_SalesRegion_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                      <script>var sc_C_Costcenter_ID = null;</script>
+                      <input type="hidden" name="inpCCostcenterId" id="C_Costcenter_ID" value="" onreset="sc_C_Costcenter_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Costcenter_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/B8321631F57E463EB617289E936BAF3A?columnName=C_Costcenter_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+              <td class="TitleCell"></td>
+            </tr>
+            <tr id="GLItemSection4_Dim">
+              <!-- User1 Dimension -->
+              <td id="user1_id_dim_label" class="TitleCell"><span class="LabelText">1st Dimension</span></td>
+              <td id="user1_id_dim_inp" class="TextBox_ContentCell" colspan="2">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_User1_ID = null;</script>
+                      <input type="hidden" name="inpUser1Id" id="User1_ID" value="" onreset="sc_User1_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User1_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/814758DD755642E9BF38BD2E5AD713EC?columnName=User1_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+              <!-- User2 Dimension -->
+              <td id="user2_id_dim_label" class="TitleCell"><span class="LabelText">2nd Dimension</span></td>
+              <td id="user2_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_User2_ID = null;</script>
+                      <input type="hidden" name="inpUser2Id" id="User2_ID" value="" onreset="sc_User2_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User2_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/BD1DA40E134A42B9889B529302A96871?columnName=User2_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
                     </td>
                   </tr>
                 </table>
@@ -1502,16 +1581,20 @@
                   <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="gridGLItem">
                     <thead>
                       <tr class="DataGrid_Body_Row">
-                        <th class="DataGrid_Header_Cell" width="300">GL Item</th>
+                        <th class="DataGrid_Header_Cell" width="300" rowspan="2">GL Item</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_bpartner_id_th">Business Partner</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_activity_id_th">Activity</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="m_product_id_th">Product</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_campaign_id_th">Campaign</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" rowspan="2">Received In</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" rowspan="2">Paid Out</th>
+                        <th class="DataGrid_Header_LineNoCell" width="20" rowspan="2"></th>
+                      </tr>
+                      <tr class="DataGrid_Body_Row">
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_project_id_th">Project</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_salesregion_id_th">Sales Region</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Received In</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Paid Out</th>
-                        <th class="DataGrid_Header_LineNoCell" width="20"></th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_costcenter_id_th">Cost Center</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="user1_id_th">1st Dimension</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="user2_id_th">2nd Dimension</th>
                       </tr>
                     </thead>
                     <tbody id="sectionGLItemGrid">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Wed Dec 12 11:19:29 2012 +0100
@@ -50,8 +50,10 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.ad_forms.AcctServer;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
+import org.openbravo.erpCommon.utility.DimensionDisplayUtility;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
@@ -59,6 +61,9 @@
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.accounting.Costcenter;
+import org.openbravo.model.financialmgmt.accounting.UserDimension1;
+import org.openbravo.model.financialmgmt.accounting.UserDimension2;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
@@ -67,7 +72,6 @@
 import org.openbravo.model.marketing.Campaign;
 import org.openbravo.model.materialmgmt.cost.ABCActivity;
 import org.openbravo.model.project.Project;
-import org.openbravo.model.sales.SalesRegion;
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class AddOrderOrInvoice extends HttpSecureAppServlet {
@@ -197,16 +201,25 @@
             checkID(strElement_AY);
             final ABCActivity activity = dao.getObject(ABCActivity.class, strElement_AY);
 
-            final String strElement_SR = glItem.getString("cSalesregionDim");
-            checkID(strElement_SR);
-            final SalesRegion salesRegion = dao.getObject(SalesRegion.class, strElement_SR);
+            final String strElement_CC = glItem.getString("cCostcenterDim");
+            checkID(strElement_CC);
+            final Costcenter costCenter = dao.getObject(Costcenter.class, strElement_CC);
 
             final String strElement_MC = glItem.getString("cCampaignDim");
             checkID(strElement_MC);
             final Campaign campaign = dao.getObject(Campaign.class, strElement_MC);
 
+            final String strElement_U1 = glItem.getString("user1Dim");
+            checkID(strElement_U1);
+            final UserDimension1 user1 = dao.getObject(UserDimension1.class, strElement_U1);
+
+            final String strElement_U2 = glItem.getString("user2Dim");
+            checkID(strElement_U2);
+            final UserDimension2 user2 = dao.getObject(UserDimension2.class, strElement_U2);
+
             FIN_AddPayment.saveGLItem(payment, glItemAmt, dao.getObject(GLItem.class, strGLItemId),
-                businessPartner, product, project, campaign, activity, salesRegion);
+                businessPartner, product, project, campaign, activity, null, costCenter, user1,
+                user2);
           }
         }
         FIN_AddPayment.setFinancialTransactionAmountAndRate(payment, exchangeRate, convertedAmount);
@@ -226,7 +239,8 @@
               message = FIN_AddPayment.processPayment(vars, this,
                   (strAction.equals("PRP") || strAction.equals("PPP")) ? "P" : "D", payment);
             }
-            if (strDifferenceAction.equals("refund")) {
+            if (strDifferenceAction.equals("refund")
+                && !"Error".equalsIgnoreCase(message.getType())) {
               Boolean newPayment = !payment.getFINPaymentDetailList().isEmpty();
               FIN_Payment refundPayment = FIN_AddPayment.createRefundPayment(this, vars, payment,
                   refundAmount.negate(), exchangeRate);
@@ -443,18 +457,42 @@
     }
 
     // Accounting Dimensions
-    final String strElement_BP = Utility.getContext(this, vars, "$Element_BP", strWindowId);
-    final String strElement_PR = Utility.getContext(this, vars, "$Element_PR", strWindowId);
-    final String strElement_PJ = Utility.getContext(this, vars, "$Element_PJ", strWindowId);
+    String doctype;
+    if (payment.isReceipt()) {
+      doctype = AcctServer.DOCTYPE_ARReceipt;
+    } else {
+      doctype = AcctServer.DOCTYPE_APPayment;
+    }
+    final String strCentrally = Utility.getContext(this, vars,
+        DimensionDisplayUtility.IsAcctDimCentrally, strWindowId);
+    final String strElement_BP = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_BPartner, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PR = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Product, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PJ = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Project, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     final String strElement_AY = Utility.getContext(this, vars, "$Element_AY", strWindowId);
-    final String strElement_SR = Utility.getContext(this, vars, "$Element_SR", strWindowId);
+    final String strElement_CC = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_CostCenter, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     final String strElement_MC = Utility.getContext(this, vars, "$Element_MC", strWindowId);
+    final String strElement_U1 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User1, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_U2 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User2, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     xmlDocument.setParameter("strElement_BP", strElement_BP);
     xmlDocument.setParameter("strElement_PR", strElement_PR);
     xmlDocument.setParameter("strElement_PJ", strElement_PJ);
     xmlDocument.setParameter("strElement_AY", strElement_AY);
-    xmlDocument.setParameter("strElement_SR", strElement_SR);
+    xmlDocument.setParameter("strElement_CC", strElement_CC);
     xmlDocument.setParameter("strElement_MC", strElement_MC);
+    xmlDocument.setParameter("strElement_U1", strElement_U1);
+    xmlDocument.setParameter("strElement_U2", strElement_U2);
 
     // Add GL Items
     JSONArray addedGLITemsArray = new JSONArray();
@@ -495,21 +533,31 @@
             .getId() : "");
         glItem.put("cActivityDimDesc", psdGLItem.getActivity() != null ? psdGLItem.getActivity()
             .getIdentifier() : "");
-        glItem.put("cSalesregionDim", psdGLItem.getSalesRegion() != null ? psdGLItem
-            .getSalesRegion().getId() : "");
-        glItem.put("cSalesregionDimDesc", psdGLItem.getSalesRegion() != null ? psdGLItem
-            .getSalesRegion().getIdentifier() : "");
+        glItem.put("cCostcenterDim", psdGLItem.getCostCenter() != null ? psdGLItem.getCostCenter()
+            .getId() : "");
+        glItem.put("cCostcenterDimDesc", psdGLItem.getCostCenter() != null ? psdGLItem
+            .getCostCenter().getIdentifier() : "");
         glItem.put("cCampaignDim", psdGLItem.getSalesCampaign() != null ? psdGLItem
             .getSalesCampaign().getId() : "");
         glItem.put("cCampaignDimDesc", psdGLItem.getSalesCampaign() != null ? psdGLItem
             .getSalesCampaign().getIdentifier() : "");
+        glItem.put("user1Dim", psdGLItem.getStDimension() != null ? psdGLItem.getStDimension()
+            .getId() : "");
+        glItem.put("user1DimDesc", psdGLItem.getStDimension() != null ? psdGLItem.getStDimension()
+            .getIdentifier() : "");
+        glItem.put("user2Dim", psdGLItem.getNdDimension() != null ? psdGLItem.getNdDimension()
+            .getId() : "");
+        glItem.put("user2DimDesc", psdGLItem.getNdDimension() != null ? psdGLItem.getNdDimension()
+            .getIdentifier() : "");
         // DisplayLogics
         glItem.put("cBpartnerDimDisplayed", strElement_BP);
         glItem.put("mProductDimDisplayed", strElement_PR);
         glItem.put("cProjectDimDisplayed", strElement_PJ);
         glItem.put("cActivityDimDisplayed", strElement_AY);
-        glItem.put("cSalesregionDimDisplayed", strElement_SR);
+        glItem.put("cCostcenterDimDisplayed", strElement_CC);
         glItem.put("cCampaignDimDisplayed", strElement_MC);
+        glItem.put("user1DimDisplayed", strElement_U1);
+        glItem.put("user2DimDisplayed", strElement_U2);
         addedGLITemsArray.put(glItem);
       } catch (JSONException e) {
         log4j.error(e);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -65,8 +65,10 @@
     <PARAMETER id="paramStrElement_PR" name="strElement_PR" attribute="value"/>
     <PARAMETER id="paramStrElement_PJ" name="strElement_PJ" attribute="value"/>
     <PARAMETER id="paramStrElement_AY" name="strElement_AY" attribute="value"/>
-    <PARAMETER id="paramStrElement_SR" name="strElement_SR" attribute="value"/>
-    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>   
+    <PARAMETER id="paramStrElement_CC" name="strElement_CC" attribute="value"/>
+    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>
+    <PARAMETER id="paramStrElement_U1" name="strElement_U1" attribute="value"/>
+    <PARAMETER id="paramStrElement_U2" name="strElement_U2" attribute="value"/>
 
     <PARAMETER id="paramGLItems" name="glItems" attribute="value" default=""/>
     
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Wed Dec 12 11:19:29 2012 +0100
@@ -200,7 +200,7 @@
       glitemCount = OB.APRM.APFT_GLItems.length,
       glitemAmount = 0,
       glitemDescLength = 20, glitemDescCont = "...",
-      cellCount, row, cellGLItemDesc, cellGLITemReceivedInAmt, cellGLITemPaidOutAmt, cellRemoveButton, i, textNode, glAcctDimsDesc, acctDim, cellGLItemDim;
+      cellCount, row, cellGLItemDesc, cellGLITemReceivedInAmt, cellGLITemPaidOutAmt, cellRemoveButton, i, textNode, glAcctDimsDesc, glAcctDimsDescNext, acctDim, cellGLItemDim;
 
   table.innerHTML = '';
   if (glitemCount === 0) {
@@ -216,13 +216,15 @@
     cellCount = 0;
     
     cellGLItemDesc = row.insertCell(cellCount);
+    cellGLItemDesc.rowSpan = "2";
     textNode = document.createTextNode(OB.APRM.APFT_GLItems[i].glitemDesc);
     cellGLItemDesc.appendChild(textNode);
     cellGLItemDesc.className = 'DataGrid_Body_Cell';
     cellCount++;
     
     // Accounting Dimensions
-    glAcctDimsDesc = ["cBpartnerDimDesc", "cActivityDimDesc", "mProductDimDesc", "cCampaignDimDesc", "cProjectDimDesc", "cSalesregionDimDesc"];
+    glAcctDimsDesc = ["cBpartnerDimDesc", "cActivityDimDesc", "mProductDimDesc", "cCampaignDimDesc"];
+    glAcctDimsDescNext = ["cProjectDimDesc", "cCostcenterDimDesc", "user1DimDesc", "user2DimDesc"];
     for (acctDim = 0; acctDim < glAcctDimsDesc.length; acctDim++) {
       if (OB.APRM.APFT_GLItems[i][glAcctDimsDesc[acctDim]]) {
         cellGLItemDim = row.insertCell(cellCount);
@@ -245,12 +247,14 @@
     }
     
     cellGLITemReceivedInAmt = row.insertCell(cellCount);
+    cellGLITemReceivedInAmt.rowSpan = "2";
     textNode = document.createTextNode(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemReceivedInAmt));
     cellGLITemReceivedInAmt.appendChild(textNode);
     cellGLITemReceivedInAmt.className = 'DataGrid_Body_Cell_Amount';
     cellCount++;
     
     cellGLITemPaidOutAmt = row.insertCell(cellCount);
+    cellGLITemPaidOutAmt.rowSpan = "2";
     textNode = document.createTextNode(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemPaidOutAmt));
     cellGLITemPaidOutAmt.appendChild(textNode);
     cellGLITemPaidOutAmt.className = 'DataGrid_Body_Cell_Amount';
@@ -262,6 +266,7 @@
       glitemAmount = subtract(applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemPaidOutAmt), applyFormatJSToOBMasked(OB.APRM.APFT_GLItems[i].glitemReceivedInAmt));
     }
     cellRemoveButton = row.insertCell(cellCount);
+    cellRemoveButton.rowSpan = "2";
     cellRemoveButton.innerHTML = '<div><button type="button" id="buttonRemoveGLItem"'
         + ' class="ButtonLink_focus" onclick="removeGLItem(' + i + ', ' + applyFormatOBMaskedToJS(glitemAmount) + ');return false;"'
         + ' onfocus="buttonEvent(\'onfocus\', this); window.status=\'OK\'; return true;"'
@@ -275,7 +280,32 @@
         + '  onmouseout="buttonEvent(\'onmouseout\', this);">'
         + '  <table class="Button"><tr><td>'
         + '    <img alt="Remove" title="Remove" src="../web/org.openbravo.advpaymentmngt/images/GLItemGridCancel-xButt.png" id="imgButtonRemove" border="0"/></td>'
-        + '  </tr></table></button></div>';
+        + '  </tr></table></button></div>';        
+
+    row = table.insertRow(table.rows.length);
+    row.className = 'DataGrid_Body_Row DataGrid_Body_Row_'+i%2;
+    cellCount = 0;
+
+    for (acctDim = 0; acctDim < glAcctDimsDescNext.length; acctDim++) {
+      if (OB.APRM.APFT_GLItems[i][glAcctDimsDescNext[acctDim]]) {
+        cellGLItemDim = row.insertCell(cellCount);
+        if (OB.APRM.APFT_GLItems[i][glAcctDimsDescNext[acctDim]].length > glitemDescLength + glitemDescCont.length) {
+          textNode = document.createTextNode(OB.APRM.APFT_GLItems[i][glAcctDimsDescNext[acctDim]].slice(0, glitemDescLength) + glitemDescCont);
+        } else {
+          textNode = document.createTextNode(OB.APRM.APFT_GLItems[i][glAcctDimsDescNext[acctDim]]);
+        }
+        cellGLItemDim.appendChild(textNode);
+        cellGLItemDim.className = 'DataGrid_Body_Cell';
+        cellCount++;
+      } else if (OB.APRM.APFT_GLItems[i][glAcctDimsDescNext[acctDim].replace("Desc", "Displayed")]) {
+        // The Acct. Dimen is displayed and the user has left it empty
+        cellGLItemDim = row.insertCell(cellCount);
+        textNode = document.createTextNode("");
+        cellGLItemDim.appendChild(textNode);
+        cellGLItemDim.className = 'DataGrid_Body_Cell';
+        cellCount++;
+      }
+    }
   }
   updateTotal();
 }
@@ -337,9 +367,15 @@
     cProjectDim: frm.inpCProjectId && frm.inpCProjectId.value,
     cProjectDimDesc: sc_C_Project_ID.selectorField.getDisplayValue(),
     cProjectDimDisplayed: frm.strElement_PJ.value,
-    cSalesregionDim: frm.inpCSalesRegionId && frm.inpCSalesRegionId.value,
-    cSalesregionDimDesc: sc_C_SalesRegion_ID.selectorField.getDisplayValue(),
-    cSalesregionDimDisplayed: frm.strElement_SR.value,
+    cCostcenterDim: frm.inpCCostcenterId && frm.inpCCostcenterId.value,
+    cCostcenterDimDesc: sc_C_Costcenter_ID.selectorField.getDisplayValue(),
+    cCostcenterDimDisplayed: frm.strElement_CC.value,
+    user1Dim: frm.inpUser1Id && frm.inpUser1Id.value,
+    user1DimDesc: sc_User1_ID.selectorField.getDisplayValue(),
+    user1DimDisplayed: frm.strElement_U1.value,
+    user2Dim: frm.inpUser2Id && frm.inpUser2Id.value,
+    user2DimDesc: sc_User2_ID.selectorField.getDisplayValue(),
+    user2DimDisplayed: frm.strElement_U2.value,
     glitemReceivedInAmt: OB.Utilities.Number.OBMaskedToJS(frm.inpGLItemReceivedInAmount.value,
                                                           getGlobalDecSeparator(),
                                                           getGlobalGroupSeparator()),
@@ -543,11 +579,23 @@
   } else {
     displayLogicDimension('c_project_id', false);
   }
-  if (document.frmMain.strElement_SR.value === 'Y' && isDisplayed) {
-    displayLogicDimension('c_salesregion_id', true);
+  if (document.frmMain.strElement_CC.value === 'Y' && isDisplayed) {
+    displayLogicDimension('c_costcenter_id', true);
     displayTitle = true;
   } else {
-    displayLogicDimension('c_salesregion_id', false);
+    displayLogicDimension('c_costcenter_id', false);
+  }
+  if (document.frmMain.strElement_U1.value === 'Y' && isDisplayed) {
+    displayLogicDimension('user1_id', true);
+    displayTitle = true;
+  } else {
+    displayLogicDimension('user1_id', false);
+  }
+  if (document.frmMain.strElement_U2.value === 'Y' && isDisplayed) {
+    displayLogicDimension('user2_id', true);
+    displayTitle = true;
+  } else {
+    displayLogicDimension('user2_id', false);
   }
   
   if (displayTitle) {
@@ -826,8 +874,10 @@
   <input type="hidden" name="strElement_PR" id="paramStrElement_PR" value=""/>
   <input type="hidden" name="strElement_PJ" id="paramStrElement_PJ" value=""/>
   <input type="hidden" name="strElement_AY" id="paramStrElement_AY" value=""/>
-  <input type="hidden" name="strElement_SR" id="paramStrElement_SR" value=""/>
+  <input type="hidden" name="strElement_CC" id="paramStrElement_CC" value=""/>
   <input type="hidden" name="strElement_MC" id="paramStrElement_MC" value=""/>
+  <input type="hidden" name="strElement_U1" id="paramStrElement_U1" value=""/>
+  <input type="hidden" name="strElement_U2" id="paramStrElement_U2" value=""/>
   <input type="hidden" name="strNotAllowExchange" id="paramStrNotAllowExchange" value=""/>
   <input type="hidden" name="strWriteOffLimit" id="paramStrWriteOffLimit" value=""/>
   <input type="hidden" name="strtypewriteoff" id="paramStrtypewriteoff" value=""/>
@@ -1717,15 +1767,44 @@
                   </tr>
                 </table>
               </td>
-              <!-- Sales Region Dimension -->
-              <td id="c_salesregion_id_dim_label" class="TitleCell"><span class="LabelText">Sales Region</span></td>
-              <td id="c_salesregion_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+              <!-- Cost Center Dimension -->
+              <td id="c_costcenter_id_dim_label" class="TitleCell"><span class="LabelText">Cost Center</span></td>
+              <td id="c_costcenter_id_dim_inp" class="TextBox_ContentCell" colspan="1">
                 <table style="border:0px;border-collapse:collapse;">
                   <tr>
                     <td style="padding-top: 0px;">
-                      <script>var sc_C_SalesRegion_ID = null;</script>
-                      <input type="hidden" name="inpCSalesRegionId" id="C_SalesRegion_ID" value="" onreset="sc_C_SalesRegion_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_SalesRegion_ID.selectorField);"></input>
-                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D8EE5430054?columnName=C_SalesRegion_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                      <script>var sc_C_Costcenter_ID = null;</script>
+                      <input type="hidden" name="inpCCostcenterId" id="C_Costcenter_ID" value="" onreset="sc_C_Costcenter_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Costcenter_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/B8321631F57E463EB617289E936BAF3A?columnName=C_Costcenter_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+              <td class="TitleCell"></td>
+            </tr>
+            <tr id="GLItemSection4_Dim">
+              <!-- User 1 Dimension -->
+              <td id="user1_id_dim_label" class="TitleCell"><span class="LabelText">1st Dimension</span></td>
+              <td id="user1_id_dim_inp" class="TextBox_ContentCell" colspan="2">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_User1_ID = null;</script>
+                      <input type="hidden" name="inpUser1Id" id="User1_ID" value="" onreset="sc_User1_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User1_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/814758DD755642E9BF38BD2E5AD713EC?columnName=User1_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+              <!-- User 2 Dimension -->
+              <td id="user2_id_dim_label" class="TitleCell"><span class="LabelText">2nd Dimension</span></td>
+              <td id="user2_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_User2_ID = null;</script>
+                      <input type="hidden" name="inpUser2Id" id="User2_ID" value="" onreset="sc_User2_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User2_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/BD1DA40E134A42B9889B529302A96871?columnName=User2_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
                     </td>
                   </tr>
                 </table>
@@ -1802,16 +1881,20 @@
                   <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;" id="gridGLItem">
                     <thead>
                       <tr class="DataGrid_Body_Row">
-                         <th class="DataGrid_Header_Cell" width="300">GL Item</th>
+                         <th class="DataGrid_Header_Cell" width="300" rowspan="2">GL Item</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_bpartner_id_th">Business Partner</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_activity_id_th">Activity</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="m_product_id_th">Product</th>
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_campaign_id_th">Campaign</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" rowspan="2">Received In</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" rowspan="2">Paid Out</th>
+                        <th class="DataGrid_Header_LineNoCell" width="20" rowspan="2"></th>
+                      </tr>
+                      <tr class="DataGrid_Body_Row">
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_project_id_th">Project</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_salesregion_id_th">Sales Region</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Received In</th>
-                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Paid Out</th>
-                        <th class="DataGrid_Header_LineNoCell" width="20"></th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="c_costcenter_id_th">Cost Center</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="user1_id_th">1st Dimension</th>
+                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100" id="user2_id_th">2nd Dimension</th>
                       </tr>
                     </thead>
                     <tbody id="sectionGLItemGrid">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Wed Dec 12 11:19:29 2012 +0100
@@ -50,8 +50,10 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.ad_forms.AcctServer;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
+import org.openbravo.erpCommon.utility.DimensionDisplayUtility;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
@@ -61,6 +63,9 @@
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.accounting.Costcenter;
+import org.openbravo.model.financialmgmt.accounting.UserDimension1;
+import org.openbravo.model.financialmgmt.accounting.UserDimension2;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
@@ -71,7 +76,6 @@
 import org.openbravo.model.marketing.Campaign;
 import org.openbravo.model.materialmgmt.cost.ABCActivity;
 import org.openbravo.model.project.Project;
-import org.openbravo.model.sales.SalesRegion;
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.xmlEngine.XmlDocument;
 
@@ -276,16 +280,25 @@
             checkID(strElement_AY);
             final ABCActivity activity = dao.getObject(ABCActivity.class, strElement_AY);
 
-            final String strElement_SR = glItem.getString("cSalesregionDim");
-            checkID(strElement_SR);
-            final SalesRegion salesRegion = dao.getObject(SalesRegion.class, strElement_SR);
+            final String strElement_CC = glItem.getString("cCostcenterDim");
+            checkID(strElement_CC);
+            final Costcenter costCenter = dao.getObject(Costcenter.class, strElement_CC);
 
             final String strElement_MC = glItem.getString("cCampaignDim");
             checkID(strElement_MC);
             final Campaign campaign = dao.getObject(Campaign.class, strElement_MC);
 
+            final String strElement_U1 = glItem.getString("user1Dim");
+            checkID(strElement_U1);
+            final UserDimension1 user1 = dao.getObject(UserDimension1.class, strElement_U1);
+
+            final String strElement_U2 = glItem.getString("user2Dim");
+            checkID(strElement_U2);
+            final UserDimension2 user2 = dao.getObject(UserDimension2.class, strElement_U2);
+
             FIN_AddPayment.saveGLItem(payment, glItemAmt, dao.getObject(GLItem.class, strGLItemId),
-                businessPartner, product, project, campaign, activity, salesRegion);
+                businessPartner, product, project, campaign, activity, null, costCenter, user1,
+                user2);
           }
         }
         payment = FIN_AddPayment.savePayment(payment, isReceipt, null, null, null, null, null,
@@ -519,18 +532,42 @@
     }
 
     // Accounting Dimensions
-    final String strElement_BP = Utility.getContext(this, vars, "$Element_BP", strWindowId);
-    final String strElement_PR = Utility.getContext(this, vars, "$Element_PR", strWindowId);
-    final String strElement_PJ = Utility.getContext(this, vars, "$Element_PJ", strWindowId);
+    String doctype;
+    if (isReceipt) {
+      doctype = AcctServer.DOCTYPE_ARReceipt;
+    } else {
+      doctype = AcctServer.DOCTYPE_APPayment;
+    }
+    final String strCentrally = Utility.getContext(this, vars,
+        DimensionDisplayUtility.IsAcctDimCentrally, strWindowId);
+    final String strElement_BP = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_BPartner, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PR = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Product, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PJ = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Project, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     final String strElement_AY = Utility.getContext(this, vars, "$Element_AY", strWindowId);
-    final String strElement_SR = Utility.getContext(this, vars, "$Element_SR", strWindowId);
+    final String strElement_CC = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_CostCenter, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     final String strElement_MC = Utility.getContext(this, vars, "$Element_MC", strWindowId);
+    final String strElement_U1 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User1, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_U2 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User2, doctype,
+            DimensionDisplayUtility.DIM_Header), strWindowId);
     xmlDocument.setParameter("strElement_BP", strElement_BP);
     xmlDocument.setParameter("strElement_PR", strElement_PR);
     xmlDocument.setParameter("strElement_PJ", strElement_PJ);
     xmlDocument.setParameter("strElement_AY", strElement_AY);
-    xmlDocument.setParameter("strElement_SR", strElement_SR);
+    xmlDocument.setParameter("strElement_CC", strElement_CC);
     xmlDocument.setParameter("strElement_MC", strElement_MC);
+    xmlDocument.setParameter("strElement_U1", strElement_U1);
+    xmlDocument.setParameter("strElement_U2", strElement_U2);
 
     // Not allow to change exchange rate and amount
     final String strNotAllowExchange = Utility.getContext(this, vars, "NotAllowChangeExchange",
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -87,8 +87,10 @@
     <PARAMETER id="paramStrElement_PR" name="strElement_PR" attribute="value"/>
     <PARAMETER id="paramStrElement_PJ" name="strElement_PJ" attribute="value"/>
     <PARAMETER id="paramStrElement_AY" name="strElement_AY" attribute="value"/>
-    <PARAMETER id="paramStrElement_SR" name="strElement_SR" attribute="value"/>
-    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>  
+    <PARAMETER id="paramStrElement_CC" name="strElement_CC" attribute="value"/>
+    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>
+    <PARAMETER id="paramStrElement_U1" name="strElement_U1" attribute="value"/>
+    <PARAMETER id="paramStrElement_U2" name="strElement_U2" attribute="value"/>
     
     <!-- Not allow to change exchange rate and amount -->
     <PARAMETER id="paramStrNotAllowExchange" name="strNotAllowExchange" attribute="value"/>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Wed Dec 12 11:19:29 2012 +0100
@@ -207,7 +207,26 @@
   } else {
     displayLogicDimension('c_salesregion_id', false);
   }
-  
+  if (document.frmMain.strElement_U1.value === 'Y' && isDisplayed) {
+        displayLogicDimension('user1_ID', true);
+        displayTitle = true;
+      } else {
+        displayLogicDimension('user1_ID', false);
+      }
+  if (document.frmMain.strElement_U2.value === 'Y' && isDisplayed) {
+      displayLogicDimension('user2_ID', true);
+      displayTitle = true;
+    } else {
+      displayLogicDimension('user2_ID', false);
+    }
+  //costcenter  is not ready
+  if (document.frmMain.strElement_CC.value === 'Y' && isDisplayed) {
+      displayLogicDimension('c_costcenter_id', true);
+      displayTitle = true;
+    } else {
+      displayLogicDimension('c_costcenter_id', false);
+    }
+ 
   if (displayTitle) {
     displayLogicElement('acctDimensionsTitle', true);
   } else {
@@ -239,6 +258,7 @@
   if (validate()) {
     setProcessingMode('popup', true);
     submitCommandForm(strCommand, false, null, '../org.openbravo.advpaymentmngt.ad_actionbutton/AddTransaction.html');
+    disableButtonProcess();
     return true;
   }
   return true;
@@ -361,6 +381,9 @@
   <input type="hidden" name="strElement_AY" id="paramStrElement_AY" value=""/>
   <input type="hidden" name="strElement_SR" id="paramStrElement_SR" value=""/>
   <input type="hidden" name="strElement_MC" id="paramStrElement_MC" value=""/>
+  <input type="hidden" name="strElement_U1" id="paramStrElement_U1" value=""/>
+  <input type="hidden" name="strElement_U2" id="paramStrElement_U2" value=""/>
+  <input type="hidden" name="strElement_CC" id="paramStrElement_CC" value=""/>
   
   <div class="Popup_ContentPane_CircleLogo">
     <div class="Popup_WindowLogo">
@@ -881,7 +904,65 @@
                   </tr>
                 </table>
               </td>
-              <!-- Activity Dimension -->
+                <!-- Product Dimension -->
+              <td id="m_product_id_dim_label" class="TitleCell"><span class="LabelText">Product</span></td>
+              <td id="m_product_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_M_Product_ID = null;</script>
+                      <input type="hidden" name="inpMProductId" id="M_Product_ID" value="" onreset="sc_M_Product_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_M_Product_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312DA8D801312DDE869B000C?columnName=M_Product_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td> 
+            <td class="TitleCell"></td>
+            </tr>
+            <tr id="GLItemSection2_Dim">
+               <!-- Project Dimension -->
+              <td id="c_project_id_dim_label" class="TitleCell"><span class="LabelText">Project</span></td>
+              <td id="c_project_id_dim_inp" class="TextBox_ContentCell" colspan="2">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_C_Project_ID = null;</script>
+                      <input type="hidden" name="inpCProjectId" id="C_Project_ID" value="" onreset="sc_C_Project_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Project_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D90408D005D?columnName=C_Project_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+              <!-- Cost center -->
+              <td id="c_costcenter_id_dim_label" class="TitleCell"><span class="LabelText">Cost Center</span></td>
+              <td id="c_costcenter_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_C_Costcenter_ID = null;</script>
+                      <input type="hidden" name="inpCCostcenterId" id="C_Costcenter_ID" value="" onreset="sc_C_Costcenter_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Costcenter_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/B8321631F57E463EB617289E936BAF3A?columnName=C_Costcenter_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+            <td class="TitleCell"></td>
+            </tr>
+            <tr id="GLItemSection3_Dim">
+             <!-- Campaign Dimension -->
+              <td id="c_campaign_id_dim_label" class="TitleCell"><span class="LabelText">Campaign</span></td>
+              <td id="c_campaign_id_dim_inp" class="TextBox_ContentCell" colspan="2">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_C_Campaign_ID = null;</script>
+                      <input type="hidden" name="inpCampaignId" id="C_Campaign_ID" value="" onreset="sc_C_Campaign_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Campaign_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D8DCCD50045?columnName=C_Campaign_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td>
+               <!-- Activity Dimension -->
               <td id="c_activity_id_dim_label" class="TitleCell"><span class="LabelText">Activity</span></td>
               <td id="c_activity_id_dim_inp" class="TextBox_ContentCell" colspan="1">
                 <table style="border:0px;border-collapse:collapse;">
@@ -894,54 +975,41 @@
                   </tr>
                 </table>
               </td>             
-              <td class="TitleCell"></td>
-            </tr>
-            <tr id="GLItemSection2_Dim">
-              <!-- Product Dimension -->
-              <td id="m_product_id_dim_label" class="TitleCell"><span class="LabelText">Product</span></td>
-              <td id="m_product_id_dim_inp" class="TextBox_ContentCell" colspan="2">
+             <td class="TitleCell"></td>
+             </tr>
+              <tr id="GLItemSection4_Dim">
+              <!-- User1-->
+              <td id="user1_ID_dim_label" class="TitleCell"><span class="LabelText">1st Dimension</span></td>
+              <td id="user1_ID_dim_inp" class="TextBox_ContentCell" colspan="2">
                 <table style="border:0px;border-collapse:collapse;">
                   <tr>
                     <td style="padding-top: 0px;">
-                      <script>var sc_M_Product_ID = null;</script>
-                      <input type="hidden" name="inpMProductId" id="M_Product_ID" value="" onreset="sc_M_Product_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_M_Product_ID.selectorField);"></input>
-                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312DA8D801312DDE869B000C?columnName=M_Product_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                      <script>var sc_User1_ID = null;</script>
+                      <input type="hidden" name="inpUser1ID" id="User1_ID" value="" onreset="sc_User1_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User1_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/814758DD755642E9BF38BD2E5AD713EC?columnName=User1_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
+                    </td>
+                  </tr>
+                </table>
+              </td> 
+              <!-- User2-->
+              <td id="user2_ID_dim_label" class="TitleCell"><span class="LabelText">2nd Dimension</span></td>
+              <td id="user2_ID_dim_inp" class="TextBox_ContentCell" colspan="1">
+                <table style="border:0px;border-collapse:collapse;">
+                  <tr>
+                    <td style="padding-top: 0px;">
+                      <script>var sc_User2_ID = null;</script>
+                      <input type="hidden" name="inpUser2ID" id="User2_ID" value="" onreset="sc_User2_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_User2_ID.selectorField);"></input>
+                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/BD1DA40E134A42B9889B529302A96871?columnName=User2_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
                     </td>
                   </tr>
                 </table>
               </td>
-              <!-- Campaign Dimension -->
-              <td id="c_campaign_id_dim_label" class="TitleCell"><span class="LabelText">Campaign</span></td>
-              <td id="c_campaign_id_dim_inp" class="TextBox_ContentCell" colspan="1">
-                <table style="border:0px;border-collapse:collapse;">
-                  <tr>
-                    <td style="padding-top: 0px;">
-                      <script>var sc_C_Campaign_ID = null;</script>
-                      <input type="hidden" name="inpCampaignId" id="C_Campaign_ID" value="" onreset="sc_C_Campaign_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Campaign_ID.selectorField);"></input>
-                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D8DCCD50045?columnName=C_Campaign_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
-                    </td>
-                  </tr>
-                </table>
-              </td>
-              <td class="TitleCell"></td>
-            </tr>
-            <tr id="GLItemSection3_Dim">
-              <!-- Project Dimension -->
-              <td id="c_project_id_dim_label" class="TitleCell"><span class="LabelText">Project</span></td>
-              <td id="c_project_id_dim_inp" class="TextBox_ContentCell" colspan="2">
-                <table style="border:0px;border-collapse:collapse;">
-                  <tr>
-                    <td style="padding-top: 0px;">
-                      <script>var sc_C_Project_ID = null;</script>
-                      <input type="hidden" name="inpCProjectId" id="C_Project_ID" value="" onreset="sc_C_Project_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Project_ID.selectorField);"></input>
-                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/FF808181312D569C01312D90408D005D?columnName=C_Project_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=false"></script>
-                    </td>
-                  </tr>
-                </table>
-              </td>
+              <td class="TitleCell"></td> 
+              </tr>
+              <tr id="GLItemSection5_Dim">
               <!-- Sales Region Dimension -->
               <td id="c_salesregion_id_dim_label" class="TitleCell"><span class="LabelText">Sales Region</span></td>
-              <td id="c_salesregion_id_dim_inp" class="TextBox_ContentCell" colspan="1">
+              <td id="c_salesregion_id_dim_inp" class="TextBox_ContentCell" colspan="2">
                 <table style="border:0px;border-collapse:collapse;">
                   <tr>
                     <td style="padding-top: 0px;">
@@ -951,8 +1019,10 @@
                     </td>
                   </tr>
                 </table>
-              </td>
-              <td class="TitleCell"></td>
+              </td>          
+             <td class="TitleCell"></td>
+             <td class="TitleCell"></td>
+             <td class="TitleCell"></td>
             </tr>                
             <!-- Payment Section START-->
             <tr id="PaymentSection">
@@ -1131,7 +1201,7 @@
                   <button type="button" 
                     id="buttonProcess"
                     class="ButtonLink" 
-                    onclick="submitThisPage('SAVE'); disableButtonProcess();return false;"
+                    onclick="submitThisPage('SAVE');return false;"
                     onfocus="buttonEvent('onfocus', this); window.status='Create'; return true;"
                     onblur="buttonEvent('onblur', this);"
                     onkeyup="buttonEvent('onkeyup', this);"
@@ -1188,3 +1258,5 @@
 </form>
 </body>
 </html>
+</body>
+</html>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Wed Dec 12 11:19:29 2012 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -48,13 +48,18 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.ad_forms.AcctServer;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
+import org.openbravo.erpCommon.utility.DimensionDisplayUtility;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.accounting.Costcenter;
+import org.openbravo.model.financialmgmt.accounting.UserDimension1;
+import org.openbravo.model.financialmgmt.accounting.UserDimension2;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
@@ -201,6 +206,16 @@
         final String strElement_MC = vars.getStringParameter("inpCampaignId", IsIDFilter.instance);
         final Campaign campaign = OBDal.getInstance().get(Campaign.class, strElement_MC);
 
+        final String strElement_U1 = vars.getStringParameter("inpUser1ID", IsIDFilter.instance);
+        final UserDimension1 user1 = OBDal.getInstance().get(UserDimension1.class, strElement_U1);
+
+        final String strElement_U2 = vars.getStringParameter("inpUser2ID", IsIDFilter.instance);
+        final UserDimension2 user2 = OBDal.getInstance().get(UserDimension2.class, strElement_U2);
+
+        final String strElement_CC = vars.getStringParameter("inpCCostcenterId",
+            IsIDFilter.instance);
+        final Costcenter costcenter = OBDal.getInstance().get(Costcenter.class, strElement_CC);
+
         BigDecimal glItemDepositAmt = new BigDecimal(strGLItemDepositAmount);
         BigDecimal glItemPaymentAmt = new BigDecimal(strGLItemPaymentAmount);
 
@@ -217,7 +232,7 @@
             FIN_Utility.getDate(strTransactionDate), glItem, isReceipt ? "RDNC" : "PWNC",
             glItemDepositAmt, glItemPaymentAmt, project, campaign, activity, isReceipt ? "BPD"
                 : "BPW", FIN_Utility.getDate(strTransactionDate), null, null, null,
-            businessPartner, product, salesRegion);
+            businessPartner, product, salesRegion, user1, user2, costcenter);
         OBError processTransactionError = processTransaction(vars, this, "P", finTrans);
         if (processTransactionError != null && "Error".equals(processTransactionError.getType())) {
           throw new OBException(processTransactionError.getMessage());
@@ -350,19 +365,42 @@
       throw new ServletException(ex);
     }
     xmlDocument.setParameter("transactionType", transactionType);
+
     // Accounting Dimensions
-    final String strElement_BP = Utility.getContext(this, vars, "$Element_BP", strWindowId);
-    final String strElement_PR = Utility.getContext(this, vars, "$Element_PR", strWindowId);
-    final String strElement_PJ = Utility.getContext(this, vars, "$Element_PJ", strWindowId);
+    final String strCentrally = Utility.getContext(this, vars,
+        DimensionDisplayUtility.IsAcctDimCentrally, strWindowId);
+
+    final String strElement_BP = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_BPartner,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PR = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Product,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_PJ = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Project,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
     final String strElement_AY = Utility.getContext(this, vars, "$Element_AY", strWindowId);
     final String strElement_SR = Utility.getContext(this, vars, "$Element_SR", strWindowId);
     final String strElement_MC = Utility.getContext(this, vars, "$Element_MC", strWindowId);
+    final String strElement_U1 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User1,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_U2 = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User2,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
+    final String strElement_CC = Utility.getContext(this, vars, DimensionDisplayUtility
+        .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_CostCenter,
+            AcctServer.DOCTYPE_FinAccTransaction, DimensionDisplayUtility.DIM_Header), strWindowId);
+
     xmlDocument.setParameter("strElement_BP", strElement_BP);
     xmlDocument.setParameter("strElement_PR", strElement_PR);
     xmlDocument.setParameter("strElement_PJ", strElement_PJ);
     xmlDocument.setParameter("strElement_AY", strElement_AY);
     xmlDocument.setParameter("strElement_SR", strElement_SR);
     xmlDocument.setParameter("strElement_MC", strElement_MC);
+    xmlDocument.setParameter("strElement_U1", strElement_U1);
+    xmlDocument.setParameter("strElement_U2", strElement_U2);
+    xmlDocument.setParameter("strElement_CC", strElement_CC);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -57,7 +57,11 @@
     <PARAMETER id="paramStrElement_PJ" name="strElement_PJ" attribute="value"/>
     <PARAMETER id="paramStrElement_AY" name="strElement_AY" attribute="value"/>
     <PARAMETER id="paramStrElement_SR" name="strElement_SR" attribute="value"/>
-    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>    
+    <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>
+    <PARAMETER id="paramStrElement_U1" name="strElement_U1" attribute="value"/>
+    <PARAMETER id="paramStrElement_U2" name="strElement_U2" attribute="value"/> 
+    <PARAMETER id="paramStrElement_CC" name="strElement_CC" attribute="value"/>       
+  
     
     <!-- Document Type -->
     <PARAMETER id="paramDocument" name="document"/>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Wed Dec 12 11:19:29 2012 +0100
@@ -216,9 +216,12 @@
           return;
         }
 
+        boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(reconciliation.TABLE_NAME,
+            reconciliation.getId(), reconciliation.TABLE_NAME + "_ID", "LE");
         if (!FIN_Utility.isPeriodOpen(reconciliation.getClient().getId(),
             AcctServer.DOCTYPE_Reconciliation, reconciliation.getOrganization().getId(),
-            strStatementDate)) {
+            strStatementDate)
+            && orgLegalWithAccounting) {
           msg.setType("Error");
           msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
           msg.setMessage(Utility.parseTranslation(this, vars, vars.getLanguage(),
@@ -229,17 +232,19 @@
           return;
         }
 
-        String identifier = linesInNotAvailablePeriod(reconciliation.getId());
-        if (!identifier.equalsIgnoreCase("")) {
-          msg.setType("Error");
-          msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
-          msg.setMessage(String.format(
-              Utility.messageBD(this, "APRM_PeriodNotAvailableClearedItem", vars.getLanguage()),
-              identifier));
-          vars.setMessage(strTabId, msg);
-          msg = null;
-          printPageClosePopUpAndRefreshParent(response, vars);
-          return;
+        if (orgLegalWithAccounting) {
+          String identifier = linesInNotAvailablePeriod(reconciliation.getId());
+          if (!identifier.equalsIgnoreCase("")) {
+            msg.setType("Error");
+            msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+            msg.setMessage(String.format(
+                Utility.messageBD(this, "APRM_PeriodNotAvailableClearedItem", vars.getLanguage()),
+                identifier));
+            vars.setMessage(strTabId, msg);
+            msg = null;
+            printPageClosePopUpAndRefreshParent(response, vars);
+            return;
+          }
         }
 
         for (APRM_FinaccTransactionV finacctrxv : reconciliation.getAPRMFinaccTransactionVList()) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Wed Dec 12 11:19:29 2012 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -19,6 +19,7 @@
 
 package org.openbravo.advpaymentmngt.algorithm;
 
+import java.util.Date;
 import java.util.List;
 
 import javax.servlet.ServletException;
@@ -28,20 +29,39 @@
 import org.openbravo.advpaymentmngt.utility.FIN_MatchingAlgorithm;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
+import org.openbravo.model.financialmgmt.payment.MatchingAlgorithm;
 
 public class StandardMatchingAlgorithm implements FIN_MatchingAlgorithm {
 
   public FIN_MatchedTransaction match(FIN_BankStatementLine line,
       List<FIN_FinaccTransaction> excluded) throws ServletException {
-    List<FIN_FinaccTransaction> transactions = MatchTransactionDao.getMatchingFinancialTransaction(
-        line.getBankStatement().getAccount().getId(), line.getTransactionDate(),
-        line.getReferenceNo(), (line.getCramount().subtract(line.getDramount())),
-        line.getBpartnername(), excluded);
+
+    MatchingAlgorithm algorithm = line.getBankStatement().getAccount().getMatchingAlgorithm();
+
+    Date transactionDate = (algorithm.isMatchtransactiondate()) ? line.getTransactionDate() : null;
+    String reference = (algorithm.isMatchreference()) ? line.getReferenceNo() : "";
+
+    List<FIN_FinaccTransaction> transactions;
+    if (algorithm.isMatchbpname()) {
+      transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
+          .getAccount().getId(), transactionDate, reference,
+          (line.getCramount().subtract(line.getDramount())), line.getBpartnername(), excluded);
+    } else {
+      transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
+          .getAccount().getId(), transactionDate, reference,
+          (line.getCramount().subtract(line.getDramount())), excluded);
+    }
+
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.STRONG);
-    transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
-        .getAccount().getId(), line.getTransactionDate(),
-        line.getCramount().subtract(line.getDramount()), excluded);
+    if (algorithm.isMatchtransactiondate()) {
+      transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
+          .getAccount().getId(), line.getTransactionDate(),
+          line.getCramount().subtract(line.getDramount()), excluded);
+    } else {
+      transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
+          .getAccount().getId(), line.getCramount().subtract(line.getDramount()), excluded);
+    }
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.WEAK);
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Wed Dec 12 11:19:29 2012 +0100
@@ -59,6 +59,9 @@
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.order.Order;
 import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.accounting.Costcenter;
+import org.openbravo.model.financialmgmt.accounting.UserDimension1;
+import org.openbravo.model.financialmgmt.accounting.UserDimension2;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
@@ -595,11 +598,18 @@
    *          accounting dimension
    * @param salesRegion
    *          accounting dimension
+   * @param costCenter
+   *          accounting dimension
+   * @param user1
+   *          accounting dimension
+   * @param user2
+   *          accounting dimension
    * @return
    */
   public FIN_PaymentScheduleDetail getNewPaymentScheduleDetail(Organization organization,
       BigDecimal amount, BusinessPartner businessPartner, Product product, Project project,
-      Campaign campaign, ABCActivity activity, SalesRegion salesRegion) {
+      Campaign campaign, ABCActivity activity, SalesRegion salesRegion, Costcenter costCenter,
+      UserDimension1 user1, UserDimension2 user2) {
     final FIN_PaymentScheduleDetail psd = getNewPaymentScheduleDetail(organization, amount);
     psd.setBusinessPartner(businessPartner);
     psd.setProduct(product);
@@ -607,10 +617,39 @@
     psd.setSalesCampaign(campaign);
     psd.setActivity(activity);
     psd.setSalesRegion(salesRegion);
+    psd.setCostCenter(costCenter);
+    psd.setStDimension(user1);
+    psd.setNdDimension(user2);
     return psd;
   }
 
   /**
+   * Returns a new FIN_PaymentScheduleDetail for the given accounting dimensions
+   * 
+   * @param organization
+   * @param amount
+   * @param businessPartner
+   *          accounting dimension
+   * @param product
+   *          accounting dimension
+   * @param project
+   *          accounting dimension
+   * @param campaign
+   *          accounting dimension
+   * @param activity
+   *          accounting dimension
+   * @param salesRegion
+   *          accounting dimension
+   * @return
+   */
+  public FIN_PaymentScheduleDetail getNewPaymentScheduleDetail(Organization organization,
+      BigDecimal amount, BusinessPartner businessPartner, Product product, Project project,
+      Campaign campaign, ABCActivity activity, SalesRegion salesRegion) {
+    return getNewPaymentScheduleDetail(organization, amount, businessPartner, product, project,
+        campaign, activity, salesRegion, null, null, null);
+  }
+
+  /**
    * Creates a new payment schedule
    * 
    */
@@ -746,7 +785,7 @@
       ABCActivity activity, String transactionType, Date statementDate) {
     return getNewFinancialTransaction(organization, account, line, payment, description,
         accountingDate, glItem, status, depositAmount, paymentAmount, project, campaing, activity,
-        transactionType, statementDate, null, null, null);
+        transactionType, statementDate, null, null, null, null, null, null);
   }
 
   public FIN_FinaccTransaction getNewFinancialTransaction(Organization organization,
@@ -778,6 +817,7 @@
     finTrans.setActivity(activity);
     finTrans.setTransactionType(transactionType);
     finTrans.setTransactionDate(statementDate);
+
     if (paymentCurrency != null && !paymentCurrency.equals(finTrans.getCurrency())) {
       finTrans.setForeignCurrency(paymentCurrency);
       finTrans.setForeignConversionRate(convertRate);
@@ -797,6 +837,22 @@
       String transactionType, Date statementDate, Currency paymentCurrency, BigDecimal convertRate,
       BigDecimal sourceAmount, BusinessPartner businessPartner, Product product,
       SalesRegion salesRegion) {
+
+    final FIN_FinaccTransaction finTrans = getNewFinancialTransaction(organization, account, line,
+        payment, description, accountingDate, glItem, status, depositAmount, paymentAmount,
+        project, campaing, activity, transactionType, statementDate, paymentCurrency, convertRate,
+        sourceAmount, businessPartner, product, salesRegion, null, null, null);
+
+    return finTrans;
+  }
+
+  public FIN_FinaccTransaction getNewFinancialTransaction(Organization organization,
+      FIN_FinancialAccount account, Long line, FIN_Payment payment, String description,
+      Date accountingDate, GLItem glItem, String status, BigDecimal depositAmount,
+      BigDecimal paymentAmount, Project project, Campaign campaing, ABCActivity activity,
+      String transactionType, Date statementDate, Currency paymentCurrency, BigDecimal convertRate,
+      BigDecimal sourceAmount, BusinessPartner businessPartner, Product product,
+      SalesRegion salesRegion, UserDimension1 user1, UserDimension2 user2, Costcenter costcenter) {
     final FIN_FinaccTransaction finTrans = getNewFinancialTransaction(organization, account, line,
         payment, description, accountingDate, glItem, status, depositAmount, paymentAmount,
         project, campaing, activity, transactionType, statementDate, paymentCurrency, convertRate,
@@ -804,6 +860,9 @@
     finTrans.setBusinessPartner(businessPartner);
     finTrans.setProduct(product);
     finTrans.setSalesRegion(salesRegion);
+    finTrans.setCostCenter(costcenter);
+    finTrans.setStDimension(user1);
+    finTrans.setNdDimension(user2);
 
     OBDal.getInstance().save(finTrans);
     OBDal.getInstance().flush();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/MatchTransactionDao.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/MatchTransactionDao.java	Wed Dec 12 11:19:29 2012 +0100
@@ -291,6 +291,54 @@
   }
 
   public static List<FIN_FinaccTransaction> getMatchingFinancialTransaction(
+      String strFinancialAccountId, Date transactionDate, String strReference, BigDecimal amount,
+      List<FIN_FinaccTransaction> excluded) {
+    final StringBuilder whereClause = new StringBuilder();
+    final List<Object> parameters = new ArrayList<Object>();
+    List<FIN_FinaccTransaction> result = null;
+    OBContext.setAdminMode();
+    try {
+      whereClause.append(" as ft ");
+      whereClause.append(" where ft.").append(FIN_FinaccTransaction.PROPERTY_ACCOUNT);
+      whereClause.append(".id = '").append(strFinancialAccountId).append("'");
+      whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_RECONCILIATION);
+      whereClause.append(" is null");
+      whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_STATUS);
+      whereClause.append(" <> 'RPPC' ");
+      whereClause.append("   and (ft.").append(FIN_FinaccTransaction.PROPERTY_DEPOSITAMOUNT);
+      whereClause.append(" - ").append(FIN_FinaccTransaction.PROPERTY_PAYMENTAMOUNT).append(")");
+      whereClause.append(" = ?");
+      parameters.add(amount);
+      if (transactionDate != null) {
+        whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_TRANSACTIONDATE);
+        whereClause.append(" = ?");
+        parameters.add(transactionDate);
+      }
+
+      if (!"".equals(strReference) && !"**".equals(strReference)) {
+        whereClause.append("   and (ft.").append(FIN_FinaccTransaction.PROPERTY_FINPAYMENT);
+        whereClause.append(".").append(FIN_Payment.PROPERTY_REFERENCENO);
+        whereClause.append(" = ?");
+        parameters.add(strReference);
+        whereClause.append("   or ft.").append(FIN_FinaccTransaction.PROPERTY_FINPAYMENT);
+        whereClause.append(".").append(FIN_Payment.PROPERTY_DOCUMENTNO);
+        whereClause.append(" = ?)");
+        parameters.add(strReference);
+      }
+
+      final OBQuery<FIN_FinaccTransaction> obData = OBDal.getInstance().createQuery(
+          FIN_FinaccTransaction.class, whereClause.toString());
+      obData.setParameters(parameters);
+
+      result = obData.list();
+      result.removeAll(excluded);
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    return result;
+  }
+
+  public static List<FIN_FinaccTransaction> getMatchingFinancialTransaction(
       String strFinancialAccountId, String strReference, BigDecimal amount, String strBpartner,
       List<FIN_FinaccTransaction> excluded) {
     return getMatchingFinancialTransaction(strFinancialAccountId, null, strReference, amount,
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Wed Dec 12 11:19:29 2012 +0100
@@ -59,6 +59,9 @@
 import org.openbravo.model.common.enterprise.OrganizationInformation;
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.plm.Product;
+import org.openbravo.model.financialmgmt.accounting.Costcenter;
+import org.openbravo.model.financialmgmt.accounting.UserDimension1;
+import org.openbravo.model.financialmgmt.accounting.UserDimension2;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
@@ -472,17 +475,25 @@
    *          accounting dimension
    * @param salesRegion
    *          accounting dimension
+   * @param costCenter
+   *          accounting dimension
+   * @param user1
+   *          accounting dimension
+   * @param user2
+   *          accounting dimension
    */
   public static void saveGLItem(FIN_Payment payment, BigDecimal glitemAmount, GLItem glitem,
       BusinessPartner businessPartner, Product product, Project project, Campaign campaign,
-      ABCActivity activity, SalesRegion salesRegion) {
+      ABCActivity activity, SalesRegion salesRegion, Costcenter costCenter, UserDimension1 user1,
+      UserDimension2 user2) {
     // FIXME: added to access the FIN_PaymentSchedule and FIN_PaymentScheduleDetail tables to be
     // removed when new security implementation is done
     dao = new AdvPaymentMngtDao();
     OBContext.setAdminMode();
     try {
       FIN_PaymentScheduleDetail psd = dao.getNewPaymentScheduleDetail(payment.getOrganization(),
-          glitemAmount, businessPartner, product, project, campaign, activity, salesRegion);
+          glitemAmount, businessPartner, product, project, campaign, activity, salesRegion,
+          costCenter, user1, user2);
       FIN_PaymentDetail pd = dao.getNewPaymentDetail(payment, psd, glitemAmount, BigDecimal.ZERO,
           false, glitem);
       pd.setFinPayment(payment);
@@ -494,6 +505,42 @@
   }
 
   /**
+   * It adds to the Payment a new Payment Detail with the given GL Item, amount and accounting
+   * dimensions
+   * 
+   * @param payment
+   *          Payment where the new Payment Detail needs to be added.
+   * @param glitemAmount
+   *          Amount of the new Payment Detail.
+   * @param glitem
+   *          GLItem to be set in the new Payment Detail.
+   * @param businessPartner
+   *          accounting dimension
+   * @param product
+   *          accounting dimension
+   * @param project
+   *          accounting dimension
+   * @param campaign
+   *          accounting dimension
+   * @param activity
+   *          accounting dimension
+   * @param salesRegion
+   *          accounting dimension
+   * @param costCenter
+   *          accounting dimension
+   * @param user1
+   *          accounting dimension
+   * @param user2
+   *          accounting dimension
+   */
+  public static void saveGLItem(FIN_Payment payment, BigDecimal glitemAmount, GLItem glitem,
+      BusinessPartner businessPartner, Product product, Project project, Campaign campaign,
+      ABCActivity activity, SalesRegion salesRegion) {
+    saveGLItem(payment, glitemAmount, glitem, businessPartner, product, project, campaign,
+        activity, salesRegion, null, null, null);
+  }
+
+  /**
    * Removes the Payment Detail from the Payment when the Detail is related to a GLItem
    * 
    * @param payment
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Wed Dec 12 11:19:29 2012 +0100
@@ -0,0 +1,161 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.financialmgmt.gl.GLJournal;
+import org.openbravo.model.financialmgmt.gl.GLJournalLine;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class FIN_AddPaymentFromJournal extends DalBaseProcess {
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    int cont = 0;
+
+    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+        .getProperty("dateFormat.java");
+    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
+
+    // Recover context and variables
+    ConnectionProvider conn = bundle.getConnection();
+    VariablesSecureApp varsAux = bundle.getContext().toVars();
+    HttpServletRequest request = RequestContext.get().getRequest();
+
+    OBContext.setOBContext(varsAux.getUser(), varsAux.getRole(), varsAux.getClient(),
+        varsAux.getOrg());
+    VariablesSecureApp vars = new VariablesSecureApp(request);
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String journalId = (String) bundle.getParams().get("GL_Journal_ID");
+      String docAction = vars.getStringParameter("inpdocaction");
+      if ("".equals(docAction)) {
+        docAction = "CO";
+      }
+
+      // Set the docAction of the Journal (Complete, Reactivate, Close...)
+      GLJournal journal = OBDal.getInstance().get(GLJournal.class, journalId);
+      journal.setDocumentAction(docAction);
+      OBDal.getInstance().flush();
+      OBDal.getInstance().refresh(journal);
+
+      // Check if the Lines of the Journal have related Payments. In that case
+      // the Payments must be deleted before Closing or Reactivating the line.
+      String relatedPayments = "";
+      if (!"CO".equals(docAction)) {
+        for (GLJournalLine journalLine : journal.getFinancialMgmtGLJournalLineList()) {
+          if (journalLine.getRelatedPayment() != null) {
+            relatedPayments = relatedPayments + journalLine.getLineNo() + ", ";
+          }
+        }
+      }
+      if (!"".equals(relatedPayments)) {
+        relatedPayments = relatedPayments.substring(0, relatedPayments.length() - 2);
+        throw new OBException("@FIN_JournalLineRelatedPayments@: " + relatedPayments);
+      }
+
+      try {
+        // Call GL_Journal_Post method from the database.
+        final List<Object> parameters = new ArrayList<Object>();
+        parameters.add(null);
+        parameters.add(journalId);
+        final String procedureName = "gl_journal_post";
+        CallStoredProcedure mm = CallStoredProcedure.getInstance();
+        mm.call(procedureName, parameters, null, false, false);
+      } catch (Exception e) {
+        OBDal.getInstance().rollbackAndClose();
+        throw new OBException(e.getCause().getMessage());
+      }
+
+      OBDal.getInstance().refresh(journal);
+      Date date = journal.getDocumentDate();
+
+      // Complete the Journal
+      if ("CO".equals(docAction)) {
+        for (GLJournalLine journalLine : journal.getFinancialMgmtGLJournalLineList()) {
+          // Recover again the object to avoid problems with Dal
+          journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLine.getId());
+          if (journalLine.isOpenItems() && journalLine.getRelatedPayment() == null) {
+            // Create bundle
+            ProcessBundle pb = new ProcessBundle("DE1B382FDD2540199D223586F6E216D0", vars)
+                .init(conn);
+            HashMap<String, Object> parameters = new HashMap<String, Object>();
+            parameters.put("GL_JournalLine_ID", journalLine.getId());
+            parameters.put("cBpartnerParaId", journalLine.getBusinessPartner().getId());
+            parameters.put("cGlitemId", journalLine.getGLItem().getId());
+            parameters.put("finFinancialAccountId", journalLine.getFinancialAccount().getId());
+            parameters.put("finPaymentmethodId", journalLine.getPaymentMethod().getId());
+            parameters.put("date", dateFormat.format(date));
+            pb.setParams(parameters);
+            OBError myMessage = null;
+            // Create a Payment for the Journal line
+            FIN_AddPaymentFromJournalLine myProcess = new FIN_AddPaymentFromJournalLine();
+            myProcess.setDoCommit(false);
+            myProcess.execute(pb);
+            myMessage = (OBError) pb.getResult();
+
+            if (myMessage.getType().equals("Error")) {
+              throw new OBException("@FIN_PaymentFromJournalError@ " + journalLine.getLineNo()
+                  + " - " + myMessage.getMessage());
+            }
+            cont++;
+          }
+        }
+      }
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+      msg.setType("Success");
+      msg.setTitle("@Success@");
+      if (cont > 0) {
+        msg.setMessage(" @FIN_NumberOfPayments@: " + cont);
+      }
+      bundle.setResult(msg);
+      OBDal.getInstance().commitAndClose();
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      msg.setTitle("@Error@");
+      OBDal.getInstance().rollbackAndClose();
+      bundle.setResult(msg);
+    }
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournalLine.java	Wed Dec 12 11:19:29 2012 +0100
@@ -0,0 +1,161 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.FIN_Utility;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.DocumentType;
+import org.openbravo.model.financialmgmt.gl.GLItem;
+import org.openbravo.model.financialmgmt.gl.GLJournalLine;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class FIN_AddPaymentFromJournalLine extends DalBaseProcess {
+  private static AdvPaymentMngtDao dao;
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    dao = new AdvPaymentMngtDao();
+    OBError message = null;
+    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+        .getProperty("dateFormat.java");
+    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
+
+    String strMessageType = "";
+    StringBuilder strMessageResult = new StringBuilder();
+    String strTitle = "";
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String journalLineId = (String) bundle.getParams().get("GL_JournalLine_ID");
+      final String bPartnerId = (String) bundle.getParams().get("cBpartnerParaId");
+      final String glItemId = (String) bundle.getParams().get("cGlitemId");
+      final String financialAccountId = (String) bundle.getParams().get("finFinancialAccountId");
+      final String paymentMethodId = (String) bundle.getParams().get("finPaymentmethodId");
+      final String strDate = (String) bundle.getParams().get("date");
+
+      // Initialize objects
+      GLJournalLine journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLineId);
+      FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          financialAccountId);
+      FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+          paymentMethodId);
+      BusinessPartner bPartner = OBDal.getInstance().get(BusinessPartner.class, bPartnerId);
+      GLItem glItem = OBDal.getInstance().get(GLItem.class, glItemId);
+      Date date = dateFormat.parse(strDate);
+      boolean isReceipt = journalLine.getDebit().subtract(journalLine.getCredit())
+          .compareTo(BigDecimal.ZERO) > 0;
+
+      // Check restrictions
+      if (!journalLine.getCurrency().equals(financialAccount.getCurrency())) {
+        throw new OBException("@FIN_NoMultiCurrencyAllowed@");
+      }
+      if (journalLine.getDebit().subtract(journalLine.getCredit()).compareTo(BigDecimal.ZERO) > 0
+          && !bPartner.isCustomer()) {
+        throw new OBException("@FIN_NoCustomer@");
+      }
+      if (journalLine.getDebit().subtract(journalLine.getCredit()).compareTo(BigDecimal.ZERO) < 0
+          && !bPartner.isVendor()) {
+        throw new OBException("@FIN_NoVendor@");
+      }
+
+      // Retrieve additional variables
+      final List<Object> parameters = new ArrayList<Object>();
+      parameters.add(journalLine.getClient().getId());
+      parameters.add(journalLine.getOrganization().getId());
+      parameters.add(isReceipt ? "ARR" : "APP");
+      String strDocTypeId = (String) CallStoredProcedure.getInstance().call("AD_GET_DOCTYPE",
+          parameters, null);
+      String strPaymentDocumentNo = FIN_Utility.getDocumentNo(journalLine.getOrganization(),
+          (isReceipt) ? "ARR" : "APP", (isReceipt) ? "AR Receipt" : "AP Payment");
+
+      // Generate Payment
+      FIN_Payment payment = dao.getNewPayment(isReceipt, journalLine.getOrganization(),
+          dao.getObject(DocumentType.class, strDocTypeId), strPaymentDocumentNo, bPartner,
+          paymentMethod, financialAccount, journalLine.getDebit().subtract(journalLine.getCredit())
+              .abs().toString(), date, null, journalLine.getCurrency(), null, null);
+
+      // Add Payment Details
+      FIN_AddPayment.saveGLItem(payment, journalLine.getDebit().subtract(journalLine.getCredit())
+          .abs(), glItem, bPartner, journalLine.getProduct(), journalLine.getProject(),
+          journalLine.getSalesCampaign(), journalLine.getActivity(), journalLine.getSalesRegion(),
+          journalLine.getCostCenter(), journalLine.getStDimension(), journalLine.getNdDimension());
+
+      OBDal.getInstance().flush();
+
+      // process payment
+      message = FIN_AddPayment.processPayment(bundle.getContext().toVars(), bundle.getConnection(),
+          "P", payment);
+
+      // Print result
+      if (message.getType().equals("Error")) {
+        String exceptionMessage = payment.getBusinessPartner().getName();
+        exceptionMessage += ": " + message.getMessage();
+        throw new OBException(exceptionMessage);
+      } else if (message.getType().equals("Warning")) {
+        strTitle = "@Warning@";
+        strMessageType = "Warning";
+      } else {
+        strTitle = "@Success@";
+        strMessageType = "Success";
+      }
+      strMessageResult.append("@Payment@ ").append(payment.getDocumentNo());
+      strMessageResult.append(" (").append(payment.getBusinessPartner().getName()).append(")");
+      if (!"".equals(message.getMessage()))
+        strMessageResult.append(": ").append(message.getMessage());
+      strMessageResult.append("<br>");
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+      msg.setType(strMessageType);
+      msg.setTitle(strTitle);
+      msg.setMessage(strMessageResult.toString());
+
+      journalLine.setRelatedPayment(payment);
+      OBDal.getInstance().flush();
+
+      bundle.setResult(msg);
+
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      msg.setTitle("@Error@");
+      bundle.setResult(msg);
+    }
+
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Dec 12 11:19:29 2012 +0100
@@ -104,9 +104,12 @@
           dao.createAPRMReadyPreference();
         }
 
+        boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(payment.TABLE_NAME,
+            payment.getId(), payment.TABLE_NAME + "_ID", "LE");
         if (!FIN_Utility.isPeriodOpen(payment.getClient().getId(), payment.getDocumentType()
             .getDocumentCategory(), payment.getOrganization().getId(), OBDateUtils
-            .formatDate(payment.getPaymentDate()))) {
+            .formatDate(payment.getPaymentDate()))
+            && orgLegalWithAccounting) {
           msg.setType("Error");
           msg.setTitle(Utility.messageBD(conProvider, "Error", language));
           msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Dec 12 11:19:29 2012 +0100
@@ -68,14 +68,18 @@
           // ***********************
           // Process Transaction
           // ***********************
+          boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(transaction.TABLE_NAME,
+              transaction.getId(), transaction.TABLE_NAME + "_ID", "LE");
           if (!FIN_Utility.isPeriodOpen(transaction.getClient().getId(),
               AcctServer.DOCTYPE_FinAccTransaction, transaction.getOrganization().getId(),
-              OBDateUtils.formatDate(transaction.getDateAcct()))) {
+              OBDateUtils.formatDate(transaction.getDateAcct()))
+              && orgLegalWithAccounting) {
             msg.setType("Error");
             msg.setTitle(Utility.messageBD(conProvider, "Error", language));
             msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
                 "@PeriodNotAvailable@"));
             bundle.setResult(msg);
+            OBDal.getInstance().rollbackAndClose();
             return;
           }
           final FIN_FinancialAccount financialAccount = transaction.getAccount();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/ProcessBatch.java	Wed Dec 12 11:19:29 2012 +0100
@@ -0,0 +1,123 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.util.Date;
+import java.util.HashMap;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.financialmgmt.gl.GLBatch;
+import org.openbravo.model.financialmgmt.gl.GLJournal;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class ProcessBatch extends DalBaseProcess {
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    int successCont = 0;
+    int errorCont = 0;
+    String errorMsg = "";
+
+    // Recover context and variables
+    ConnectionProvider conn = bundle.getConnection();
+    VariablesSecureApp varsAux = bundle.getContext().toVars();
+    HttpServletRequest request = RequestContext.get().getRequest();
+
+    OBContext.setOBContext(varsAux.getUser(), varsAux.getRole(), varsAux.getClient(),
+        varsAux.getOrg());
+    VariablesSecureApp vars = new VariablesSecureApp(request);
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String batchId = (String) bundle.getParams().get("GL_JournalBatch_ID");
+
+      GLBatch batch = OBDal.getInstance().get(GLBatch.class, batchId);
+
+      // Process the Batch
+      for (GLJournal journal : batch.getFinancialMgmtGLJournalList()) {
+        if (!journal.isProcessed()) {
+          // Recover again the object to avoid problems with Dal
+          journal = OBDal.getInstance().get(GLJournal.class, journal.getId());
+          ProcessBundle pb = new ProcessBundle("5BE14AA10165490A9ADEFB7532F7FA94", vars).init(conn);
+          HashMap<String, Object> parameters = new HashMap<String, Object>();
+          parameters.put("GL_Journal_ID", journal.getId());
+          pb.setParams(parameters);
+          OBError myMessage = null;
+          // Process each Joural
+          FIN_AddPaymentFromJournal myProcess = new FIN_AddPaymentFromJournal();
+          myProcess.execute(pb);
+          myMessage = (OBError) pb.getResult();
+
+          if (myMessage.getType().equals("Error")) {
+            errorCont++;
+            if (!"".equals(errorMsg)) {
+              errorMsg = errorMsg + "<br />";
+            }
+            errorMsg = errorMsg + "@FIN_JournalBatchErrorProcess@ " + journal.getDocumentNo()
+                + ". " + myMessage.getMessage();
+          } else {
+            successCont++;
+          }
+        }
+      }
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+
+      if (errorCont == 0) {
+        msg.setType("Success");
+        msg.setTitle("@Success@");
+        batch = OBDal.getInstance().get(GLBatch.class, batchId);
+        batch.setProcessed(true);
+        batch.setUpdated(new Date());
+        OBDal.getInstance().flush();
+      } else if (errorCont > 0 && successCont == 0) {
+        msg.setType("Error");
+        msg.setTitle("@Error@");
+        msg.setMessage(errorMsg);
+      } else {
+        msg.setType("Warning");
+        msg.setTitle("@Warning@");
+        msg.setMessage(errorMsg);
+      }
+
+      bundle.setResult(msg);
+
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      OBDal.getInstance().rollbackAndClose();
+      bundle.setResult(msg);
+    }
+
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Dec 12 11:19:29 2012 +0100
@@ -1100,4 +1100,21 @@
       return true;
     }
   }
+
+  public static boolean periodControlOpened(String tableName, String recordId, String idColumnName,
+      String orgType) {
+    final Session session = OBDal.getInstance().getSession();
+
+    List<Object> parameters = new ArrayList<Object>();
+    parameters.add(tableName);
+    parameters.add(recordId);
+    parameters.add(idColumnName);
+    parameters.add(orgType);
+    Object result = CallStoredProcedure.getInstance().call("ad_get_doc_le_bu", parameters, null,
+        false, true);
+
+    Organization org = OBDal.getInstance().get(Organization.class, (String) result);
+
+    return org.getOrganizationType().isLegalEntityWithAccounting();
+  }
 }
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <NAME><![CDATA[JBoss Weld]]></NAME>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.18511]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.19003]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -143,6 +143,17 @@
 <!--090A37D22ED3AFD5012ED3C5DE60001C-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--090A37D22ED3AFD5012ED3C5DE60001C--></AD_MESSAGE>
 
+<!--0BEB24CF954E410EAFE4EF198C38A902--><AD_MESSAGE>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <AD_MESSAGE_ID><![CDATA[0BEB24CF954E410EAFE4EF198C38A902]]></AD_MESSAGE_ID>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <VALUE><![CDATA[OBUIAPP_Res_MoreThanOrderedQty]]></VALUE>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <MSGTEXT><![CDATA[Total prereserved quantity exceeds the quantity in sales order line (%0) considering the already reserved quantity in other reservations (%1). Please enter a valid number.]]></MSGTEXT>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--0BEB24CF954E410EAFE4EF198C38A902-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--0BEB24CF954E410EAFE4EF198C38A902--></AD_MESSAGE>
+
 <!--0D2FEB9F4F39423BB5A5310891256558--><AD_MESSAGE>
 <!--0D2FEB9F4F39423BB5A5310891256558-->  <AD_MESSAGE_ID><![CDATA[0D2FEB9F4F39423BB5A5310891256558]]></AD_MESSAGE_ID>
 <!--0D2FEB9F4F39423BB5A5310891256558-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -209,6 +220,17 @@
 <!--1C8D1970AE9A46319D42430A0D0AAF09-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--1C8D1970AE9A46319D42430A0D0AAF09--></AD_MESSAGE>
 
+<!--1E1CAC55E447469293C57EF539B3BEEC--><AD_MESSAGE>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <AD_MESSAGE_ID><![CDATA[1E1CAC55E447469293C57EF539B3BEEC]]></AD_MESSAGE_ID>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <VALUE><![CDATA[OBUIAPP_Res_MoreThanReservationQty]]></VALUE>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <MSGTEXT><![CDATA[Total reserved quantity exceeds the reservation quantity. The sum of all reserved quantities must be equal or lower than %0.]]></MSGTEXT>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--1E1CAC55E447469293C57EF539B3BEEC-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1E1CAC55E447469293C57EF539B3BEEC--></AD_MESSAGE>
+
 <!--2052DF26669F4864B295C17502F53E38--><AD_MESSAGE>
 <!--2052DF26669F4864B295C17502F53E38-->  <AD_MESSAGE_ID><![CDATA[2052DF26669F4864B295C17502F53E38]]></AD_MESSAGE_ID>
 <!--2052DF26669F4864B295C17502F53E38-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -409,6 +431,17 @@
 <!--52FC93FB2DEC4C168D14E65195F97752-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--52FC93FB2DEC4C168D14E65195F97752--></AD_MESSAGE>
 
+<!--597897349BE0452C89E43E27D94A175D--><AD_MESSAGE>
+<!--597897349BE0452C89E43E27D94A175D-->  <AD_MESSAGE_ID><![CDATA[597897349BE0452C89E43E27D94A175D]]></AD_MESSAGE_ID>
+<!--597897349BE0452C89E43E27D94A175D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--597897349BE0452C89E43E27D94A175D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--597897349BE0452C89E43E27D94A175D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--597897349BE0452C89E43E27D94A175D-->  <VALUE><![CDATA[OBUIAPP_Res_LessThanReleased]]></VALUE>
+<!--597897349BE0452C89E43E27D94A175D-->  <MSGTEXT><![CDATA[Reserved quantity is lower than the released quantity. Enter a valid number equal or higher than %0.]]></MSGTEXT>
+<!--597897349BE0452C89E43E27D94A175D-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--597897349BE0452C89E43E27D94A175D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--597897349BE0452C89E43E27D94A175D--></AD_MESSAGE>
+
 <!--5B1FB06A4EBA4654A9A93695434C72AE--><AD_MESSAGE>
 <!--5B1FB06A4EBA4654A9A93695434C72AE-->  <AD_MESSAGE_ID><![CDATA[5B1FB06A4EBA4654A9A93695434C72AE]]></AD_MESSAGE_ID>
 <!--5B1FB06A4EBA4654A9A93695434C72AE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -896,6 +929,17 @@
 <!--B8C1706AB7C34C0EA750048CD68E314A-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--B8C1706AB7C34C0EA750048CD68E314A--></AD_MESSAGE>
 
+<!--C415C626CAE14E35A7F05C42F11DA114--><AD_MESSAGE>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_MESSAGE_ID><![CDATA[C415C626CAE14E35A7F05C42F11DA114]]></AD_MESSAGE_ID>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <VALUE><![CDATA[OBUIAPP_Res_MoreThanPendingQty]]></VALUE>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <MSGTEXT><![CDATA[Total prereserved quantity exceeds the pending to receipt quantity. The sum of all prereserved quantities must be equal or lower than %0.]]></MSGTEXT>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C415C626CAE14E35A7F05C42F11DA114--></AD_MESSAGE>
+
 <!--C525E9A7101B4920A8A652DD94B97AFE--><AD_MESSAGE>
 <!--C525E9A7101B4920A8A652DD94B97AFE-->  <AD_MESSAGE_ID><![CDATA[C525E9A7101B4920A8A652DD94B97AFE]]></AD_MESSAGE_ID>
 <!--C525E9A7101B4920A8A652DD94B97AFE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -973,6 +1017,17 @@
 <!--CE3E9A8711D54E719F02630BE8D5E2FB-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--CE3E9A8711D54E719F02630BE8D5E2FB--></AD_MESSAGE>
 
+<!--D109B6F7D8BF4F5C9D84463CD36BF434--><AD_MESSAGE>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <AD_MESSAGE_ID><![CDATA[D109B6F7D8BF4F5C9D84463CD36BF434]]></AD_MESSAGE_ID>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <VALUE><![CDATA[OBUIAPP_Res_MoreQtyThanAvailable]]></VALUE>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <MSGTEXT><![CDATA[Reserved quantity exceeds the available quantity (%0) considering the quantity reserved in other reservations (%1). Please, enter a valid number.]]></MSGTEXT>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D109B6F7D8BF4F5C9D84463CD36BF434--></AD_MESSAGE>
+
 <!--D514BC49ED374B7288B215D94DAC3177--><AD_MESSAGE>
 <!--D514BC49ED374B7288B215D94DAC3177-->  <AD_MESSAGE_ID><![CDATA[D514BC49ED374B7288B215D94DAC3177]]></AD_MESSAGE_ID>
 <!--D514BC49ED374B7288B215D94DAC3177-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <NAME><![CDATA[User Interface Application]]></NAME>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.18511]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Wed Dec 12 11:19:29 2012 +0100
@@ -269,6 +269,9 @@
     // Return Material
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/return-material/ob-return-material.js", false));
+    // Reservations
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js", false));
 
     // Styling
     globalResources.add(createStyleSheetResource(
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java	Wed Dec 12 11:19:29 2012 +0100
@@ -32,6 +32,7 @@
 import org.openbravo.client.kernel.reference.UIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
 import org.openbravo.client.kernel.reference.YesNoUIDefinition;
+import org.openbravo.erpCommon.utility.DimensionDisplayUtility;
 import org.openbravo.model.ad.ui.AuxiliaryInput;
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Tab;
@@ -68,6 +69,7 @@
 
   private String code;
   private Tab tab;
+  private Field field;
   private StringBuffer jsCode;
   private ApplicationDictionaryCachedStructures cachedStructures;
 
@@ -77,6 +79,13 @@
     parse();
   }
 
+  public DynamicExpressionParser(String code, Tab tab, Field field) {
+    this.code = code;
+    this.tab = tab;
+    this.field = field;
+    parse();
+  }
+
   public DynamicExpressionParser(String code, Tab tab,
       ApplicationDictionaryCachedStructures cachedStructures) {
     this.cachedStructures = cachedStructures;
@@ -85,14 +94,24 @@
     parse();
   }
 
+  public DynamicExpressionParser(String code, Tab tab,
+      ApplicationDictionaryCachedStructures cachedStructures, Field field) {
+    this.cachedStructures = cachedStructures;
+    this.code = code;
+    this.tab = tab;
+    this.field = field;
+    parse();
+  }
+
   /*
    * Note: This method was partially copied from WadUtility.
    */
   public void parse() {
+    jsCode = new StringBuffer();
+
     StringTokenizer st = new StringTokenizer(code, "|&", true);
     String token, token2;
     String strAux;
-    jsCode = new StringBuffer();
     while (st.hasMoreTokens()) {
       strAux = st.nextToken().trim();
       int i[] = getFirstElement(UNIONS, strAux);
@@ -122,6 +141,22 @@
           leftPart.text.contains("currentValues"), leftPart.isBoolean);
       jsCode.append(rightPart.text);
     }
+    // Handle accounting dimensions special display logic
+    if (jsCode.toString().contains(DimensionDisplayUtility.DIM_DISPLAYLOGIC)) {
+      List<String> sessionVariablesToLoad = DimensionDisplayUtility
+          .getRequiredSessionVariablesForTab(this.tab, this.field);
+      for (String sv : sessionVariablesToLoad) {
+        sessionAttributesInExpression.add(sv);
+      }
+      String parsedDisplay = DimensionDisplayUtility.computeAccountingDimensionDisplayLogic(
+          this.tab, this.field);
+      if (!"".equals(parsedDisplay)) {
+        parsedDisplay = "(" + parsedDisplay + ")";
+      }
+      jsCode = new StringBuffer(jsCode.toString().replace(DimensionDisplayUtility.DIM_DISPLAYLOGIC,
+          parsedDisplay));
+    }
+
   }
 
   /**
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Dec 12 11:19:29 2012 +0100
@@ -422,7 +422,7 @@
           // This session attributes could be a preference
           if (field.getDisplayLogic() != null && field.isDisplayed() && field.isActive()) {
             final DynamicExpressionParser parser = new DynamicExpressionParser(
-                field.getDisplayLogic(), tab, cachedStructures);
+                field.getDisplayLogic(), tab, cachedStructures, field);
             setSessionAttributesFromParserResult(parser, sessionAttributesMap, tab.getWindow()
                 .getId());
           }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Dec 12 11:19:29 2012 +0100
@@ -120,7 +120,8 @@
         continue;
       }
 
-      final DynamicExpressionParser parser = new DynamicExpressionParser(f.getDisplayLogic(), tab);
+      final DynamicExpressionParser parser = new DynamicExpressionParser(f.getDisplayLogic(), tab,
+          f);
       displayLogicMap.put(f, parser.getJSExpression());
 
       log.debug(f.getTab().getId() + " - " + f.getName() + " >>> " + parser.getJSExpression());
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Wed Dec 12 11:19:29 2012 +0100
@@ -250,7 +250,8 @@
     if (parentProperty != null) {
       return parentProperty;
     }
-    if (tab.getTable().getId().equals(parentTabComponent.getTab().getTable().getId()) && ("RO".equals(tab.getUIPattern()) || "SR".equals(tab.getUIPattern()))) {
+    if (tab.getTable().getId().equals(parentTabComponent.getTab().getTable().getId())
+        && ("RO".equals(tab.getUIPattern()) || "SR".equals(tab.getUIPattern()))) {
       parentProperty = getEntity().getIdProperties().get(0).getName();
     } else {
       parentProperty = ApplicationUtils.getParentProperty(tab, parentTabComponent.getTab());
@@ -609,7 +610,7 @@
       // Display Logic
       if (fld.getDisplayLogic() != null) {
         final DynamicExpressionParser parser = new DynamicExpressionParser(fld.getDisplayLogic(),
-            tab);
+            tab, fld);
         showIf = parser.getJSExpression();
         if (parser.getSessionAttributes().size() > 0) {
           sessionLogic = true;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js	Wed Dec 12 11:19:29 2012 +0100
@@ -105,7 +105,7 @@
 
   initWidget: function () {
     // added for showing counts in the filtereditor row
-    this.checkboxFieldDefaults = isc.addProperties(this.checkboxFieldDefaults, {
+    this.checkboxFieldProperties = isc.addProperties({}, this.checkboxFieldProperties || {}, {
       canFilter: true,
       //frozen: true, /* Removed due to issue https://issues.openbravo.com/view.php?id=17611 */
       canFreeze: true,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Wed Dec 12 11:19:29 2012 +0100
@@ -248,7 +248,7 @@
 
           if (LKS.list[i].execLevel) {
             for (j = 0; j < LKS.list[i].execLevel.length; j++) {
-              if (LKS.list[i].execLevel[j] === 'Canvas' && LKS.list[i].id !== 'Canvas_Avoid_Backspace') {
+              if (LKS.list[i].execLevel[j] === 'Canvas') {
                 isCanvasShortcut = true;
                 break;
               }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-canvas.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-canvas.js	Wed Dec 12 11:19:29 2012 +0100
@@ -109,4 +109,31 @@
       this.setContents('-' + displayValue);
     }
   }
+});
+
+isc.defineClass('OBAddPercentageSign', isc.Label);
+
+isc.OBAddPercentageSign.addProperties({
+  wrap: false,
+  height: 1,
+  width: 1,
+  overflow: 'visible',
+
+  setRecord: function (record) {
+    var fld = this.grid.getField(this.fieldName),
+        val = record[this.fieldName];
+    if (fld && fld.type && isc.SimpleType.getType(fld.type).normalDisplayFormatter) {
+      this.showValue(isc.SimpleType.getType(fld.type).normalDisplayFormatter(val), val);
+    } else {
+      this.showValue(String(record[this.fieldName]));
+    }
+  },
+
+  showValue: function (displayValue, dataValue, form, item) {
+    if (!displayValue) {
+      this.setContents('0 %');
+    } else {
+      this.setContents(displayValue + ' %');
+    }
+  }
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Wed Dec 12 11:19:29 2012 +0100
@@ -105,7 +105,7 @@
   blur: function () {
     var blurValue = this.blurValue(),
         newBlurValue = '',
-        digitRegExp = new RegExp('^\\d+$', 'gm'),
+        jsValue, digitRegExp = new RegExp('^\\d+$', 'gm'),
         newValue, i;
 
     if (!this.areDateItemPropertiesSet) {
@@ -124,7 +124,12 @@
     if (digitRegExp.test(newBlurValue)) {
       newValue = this.parseValue();
       if (newValue) {
-        this.setValue(OB.Utilities.Date.OBToJS(newValue, this.dateFormat));
+        jsValue = OB.Utilities.Date.OBToJS(newValue, this.dateFormat);
+        // if jsValue == null then this is an illegal date, will be 
+        // caught later
+        if (jsValue) {
+          this.setValue(jsValue);
+        }
       }
     }
 
@@ -236,7 +241,7 @@
 // MiniDateRangeItem to make it editable.
 isc.ClassFactory.defineClass('OBMiniDateRangeItem', isc.OBTextItem);
 
-isc.OBMiniDateRangeItem.addProperties(OB.DateItemProperties, {
+isc.OBMiniDateRangeItem.addProperties({}, OB.DateItemProperties, {
   validateOnExit: false,
   showPickerIcon: false,
   filterOnKeypress: false,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-linked-items.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-linked-items.js	Wed Dec 12 11:19:29 2012 +0100
@@ -224,7 +224,7 @@
    * Opens linked item in a new window
    */
   openLinkedItemInNewWindow: function (record) {
-    OB.Utilities.openDirectTab(record.adTabId,record.id,'DEFAULT');
+    OB.Utilities.openDirectTab(record.adTabId, record.id, 'DEFAULT');
   },
 
   /**
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Dec 12 11:19:29 2012 +0100
@@ -1121,7 +1121,7 @@
 
   // calls setValue and the onchange handling
   setItemValue: function (item, value) {
-    var currentValue, view, isGridItem, completeFieldsLength, i;
+    var currentValue, view, isGridItem, completeFieldsLength, i, undef;
 
     if (isc.isA.String(item)) {
 
@@ -1151,7 +1151,7 @@
     currentValue = item.getValue();
 
     // no change go away
-    if (item.compareValues(value, currentValue)) {
+    if (currentValue !== undef && item.compareValues(value, currentValue)) {
       // Force setElemntValue even there is no change to show new possible values
       // in field.valueMap (issue #18957)
       item.setElementValue(item.mapValueToDisplay(value));
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Dec 12 11:19:29 2012 +0100
@@ -335,8 +335,16 @@
 
       getCellValue: function (record, recordNum, fieldNum, gridBody) {
         var field = this.getField(fieldNum),
-            func = this.getGridSummaryFunction(field),
+            gridField, func = this.parentElement.getGridSummaryFunction(field),
             value = record && field ? (field.displayField ? record[field.displayField] : record[field.name]) : null;
+
+        // get the summary function from the main grid
+        if (!func) {
+          delete field.summaryFunction;
+        } else {
+          field.summaryFunction = func;
+        }
+
         // handle count much simpler than smartclient does
         // so no extra titles or formatting
         if (record && func === 'count' && value >= 0) {
@@ -361,7 +369,7 @@
     this.editFormDefaults = isc.addProperties({}, isc.clone(OB.ViewFormProperties), this.editFormDefaults);
 
     // added for showing counts in the filtereditor row
-    this.checkboxFieldDefaults = isc.addProperties(this.checkboxFieldDefaults, {
+    this.checkboxFieldProperties = isc.addProperties({}, this.checkboxFieldProperties | {}, {
       canFilter: true,
       // frozen is much nicer, but check out this forum discussion:
       // http://forums.smartclient.com/showthread.php?p=57581
@@ -573,7 +581,7 @@
     } else if (this.showGridSummary) {
       noSummaryFunction = true;
       for (i = 0; i < this.getFields().length; i++) {
-        if (this.summaryFunction) {
+        if (this.getFields()[i].summaryFunction) {
           noSummaryFunction = false;
           break;
         }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Dec 12 11:19:29 2012 +0100
@@ -1540,6 +1540,7 @@
       }
       if (me.viewGrid.data) {
         var recordIndex = me.viewGrid.getRecordIndex(me.viewGrid.getSelectedRecord());
+        data = OB.Utilities.Date.convertUTCTimeToLocalTime(data, me.viewGrid.completeFields);
         me.viewGrid.data.updateCacheData(data, req);
         me.viewGrid.selectRecord(me.viewGrid.getRecord(recordIndex));
         me.viewGrid.refreshRow(recordIndex);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js	Wed Dec 12 11:19:29 2012 +0100
@@ -0,0 +1,107 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+OB.Reservation = OB.Reservation || {};
+
+/**
+ * Check that entered quantity to reserve is available in the selected record
+ * and that total reserved quantity is below the needed quantity
+ */
+OB.Reservation.QuantityValidate = function (item, validator, value, record) {
+  var availableQty = isc.isA.Number(record.availableQty) ? new BigDecimal(String(record.availableQty)) : BigDecimal.prototype.ZERO,
+      releasedQty = isc.isA.Number(record.released) ? new BigDecimal(String(record.released)) : BigDecimal.prototype.ZERO,
+      reservedinothersQty = isc.isA.Number(record.reservedinothers) ? new BigDecimal(String(record.reservedinothers)) : BigDecimal.prototype.ZERO,
+      quantity = null,
+      reservedQty = BigDecimal.prototype.ZERO,
+      totalQty = isc.isA.Number(record.reservationQuantity) ? new BigDecimal(String(record.reservationQuantity)) : BigDecimal.prototype.ZERO,
+      selectedRecords = item.grid.getSelectedRecords(),
+      selectedRecordsLength = selectedRecords.length,
+      editedRecord = null,
+      i;
+
+  if (!isc.isA.Number(value)) {
+    return false;
+  }
+  if (value === null || value < 0) {
+    return false;
+  }
+  quantity = new BigDecimal(String(value));
+  if (quantity.compareTo(availableQty.subtract(reservedinothersQty)) > 0) {
+    isc.warn(OB.I18N.getLabel('OBUIAPP_Res_MoreQtyThanAvailable', [record.availableQty, record.reservedinothers]));
+    return false;
+  }
+  if (quantity.compareTo(releasedQty) < 0) {
+    isc.warn(OB.I18N.getLabel('OBUIAPP_Res_LessThanReleased', [record.released]));
+    return false;
+  }
+  for (i = 0; i < selectedRecordsLength; i++) {
+    editedRecord = isc.addProperties({}, selectedRecords[i], item.grid.getEditedRecord(selectedRecords[i]));
+    if (isc.isA.Number(editedRecord.quantity)) {
+      reservedQty = reservedQty.add(new BigDecimal(String(editedRecord.quantity)));
+    }
+  }
+  if (reservedQty.compareTo(totalQty) > 0) {
+    isc.warn(OB.I18N.getLabel('OBUIAPP_Res_MoreThanReservationQty', [totalQty.toString()]));
+    return false;
+  }
+  // get reservation quantity and released quantity to check totals
+  return true;
+};
+
+OB.Reservation.PrereservationQuantityValidate = function (item, validator, value, record) {
+  var reservedQty = isc.isA.Number(record.reservedQty) ? new BigDecimal(String(record.reservedQty)) : BigDecimal.prototype.ZERO,
+      purchasedQty = isc.isA.Number(record.purchasedQty) ? new BigDecimal(String(record.purchasedQty)) : BigDecimal.prototype.ZERO,
+      receivedQty = isc.isA.Number(record.receivedQty) ? new BigDecimal(String(record.receivedQty)) : BigDecimal.prototype.ZERO,
+      pendingQty = purchasedQty.subtract(receivedQty),
+      orderedQuantity = isc.isA.Number(record.orderedQuantity) ? new BigDecimal(String(record.orderedQuantity)) : BigDecimal.prototype.ZERO,
+      deliveredQuantity = isc.isA.Number(record.deliveredQuantity) ? new BigDecimal(String(record.deliveredQuantity)) : BigDecimal.prototype.ZERO,
+      otherReservedQty = isc.isA.Number(record.otherReservedQty) ? new BigDecimal(String(record.otherReservedQty)) : BigDecimal.prototype.ZERO,
+      solTotalReserved = BigDecimal.prototype.ZERO,
+      totalQty = BigDecimal.prototype.ZERO,
+      selectedRecords = item.grid.getSelectedRecords(),
+      selectedRecordsLength = selectedRecords.length,
+      editedRecord = null,
+      i;
+
+
+  if (!isc.isA.Number(value)) {
+    return false;
+  }
+  if (value === null || value < 0) {
+    return false;
+  }
+  reservedQty = new BigDecimal(String(value));
+  solTotalReserved = reservedQty.add(otherReservedQty);
+  if (solTotalReserved.compareTo(orderedQuantity) > 0) {
+    isc.warn(OB.I18N.getLabel('OBUIAPP_Res_MoreThanOrderedQty', [record.orderedQuantity, record.otherReservedQty]));
+    return false;
+  }
+
+  for (i = 0; i < selectedRecordsLength; i++) {
+    editedRecord = isc.addProperties({}, selectedRecords[i], item.grid.getEditedRecord(selectedRecords[i]));
+    if (isc.isA.Number(editedRecord.reservedQty)) {
+      totalQty = totalQty.add(new BigDecimal(String(editedRecord.reservedQty)));
+    }
+  }
+  if (totalQty.compareTo(pendingQty) > 0) {
+    isc.warn(OB.I18N.getLabel('OBUIAPP_Res_MoreThanPendingQty', [solTotalReserved.toString()]));
+    return false;
+  }
+  return true;
+};
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Wed Dec 12 11:19:29 2012 +0100
@@ -107,7 +107,7 @@
 
     this.orderByClause = this.gridProperties.orderByClause;
 
-    this.checkboxFieldDefaults = isc.addProperties(this.checkboxFieldDefaults, {
+    this.checkboxFieldProperties = isc.addProperties({}, this.checkboxFieldProperties | {}, {
       canFilter: true,
       frozen: true,
       canFreeze: true,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Wed Dec 12 11:19:29 2012 +0100
@@ -347,17 +347,6 @@
   // Initialize KeyboardManager object
   keyboardMgr = O.KeyboardManager = new KeyboardManager();
 
-  // To avoid default browser behavior that makes "Backspace" key go to previous html page
-  O.KeyboardManager.Shortcuts.set('Canvas_Avoid_Backspace', 'Canvas', function () {
-    if (document.activeElement && (document.activeElement.tagName.toLowerCase() === 'div' || document.activeElement.tagName.toLowerCase() === 'body')) {
-      return false;
-    } else {
-      return true;
-    }
-  }, null, {
-    "key": "Backspace"
-  });
-
   // To fix issue https://issues.openbravo.com/view.php?id=21786
   isc.ComboBoxItem.getPrototype()._originalKeyDown = isc.ComboBoxItem.getPrototype().keyDown;
   isc.ComboBoxItem.getPrototype().keyDown = function () {
@@ -376,6 +365,10 @@
     return response;
   };
 
+  O.KeyboardManager.Shortcuts.origWindowOnKeyDown = null;
+  O.KeyboardManager.Shortcuts.origWindowOnKeyUp = null;
+  O.KeyboardManager.Shortcuts.isOrigWindowOnKeyDownSet = false;
+
   /* isc.Page.setEvent('keyPress', 'OB.KeyboardManager.Shortcuts.monitor('Canvas')'); // Discart due to Chrome event propagation problems http://forums.smartclient.com/showthread.php?p=65578 */
   isc.Canvas.getPrototype()._originalKeyDown = isc.Canvas.getPrototype().keyDown;
   isc.Canvas.getPrototype().keyDown = function () {
@@ -386,6 +379,38 @@
     },
         response;
 
+    // Special case to avoid "BACKSPACE" key resulting in a browser shortcut that performs a browser history "Go back".
+    // Issue: https://issues.openbravo.com/view.php?id=21776
+    if (isc.EH.getKey() === 'Backspace' && !isc.EH.ctrlKeyDown() && !isc.EH.altKeyDown() && !isc.EH.shiftKeyDown()) {
+      if (!O.KeyboardManager.Shortcuts.isOrigWindowOnKeyDownSet) {
+        var avoidBackspace, restoreOriginals;
+
+        O.KeyboardManager.Shortcuts.isOrigWindowOnKeyDownSet = true;
+        O.KeyboardManager.Shortcuts.origWindowOnKeyDown = window.onkeydown;
+        O.KeyboardManager.Shortcuts.origWindowOnKeyUp = window.onkeyup;
+
+        avoidBackspace = function (e) {
+          if (e.keyCode === 8) {
+            if (document.activeElement && (document.activeElement.tagName.toLowerCase() === 'div' || document.activeElement.tagName.toLowerCase() === 'body')) {
+              return false;
+            } else {
+              return true;
+            }
+          } else {
+            return true;
+          }
+        };
+
+        restoreOriginals = function (e) {
+          window.onkeydown = O.KeyboardManager.Shortcuts.origWindowOnKeyDown;
+          window.onkeyup = O.KeyboardManager.Shortcuts.origWindowOnKeyUp;
+          O.KeyboardManager.Shortcuts.isOrigWindowOnKeyDownSet = false;
+        };
+
+        window.onkeydown = avoidBackspace;
+        window.onkeyup = restoreOriginals;
+      }
+    }
     if (isc.Event.getKey() === 'Space') {
       OB.KeyboardManager.Shortcuts.isSpacePressed = true;
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Wed Dec 12 11:19:29 2012 +0100
@@ -151,6 +151,12 @@
 
   fullYear = parseInt(fullYear, 10);
   JSDate.setFullYear(fullYear, month - 1, day);
+
+  //  https://issues.openbravo.com/view.php?id=22505
+  if (day !== JSDate.getDate()) {
+    return null;
+  }
+
   JSDate.setHours(hours);
   JSDate.setMinutes(minutes);
   JSDate.setSeconds(seconds);
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.css	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.css	Wed Dec 12 11:19:29 2012 +0100
@@ -437,6 +437,12 @@
 
 /******************************/
 
+.OBGridFormLabel {
+  padding: 0px 4px 0px 4px;
+  font-family: arial, sans-serif;
+  font-size: 12px;
+}
+
 .OBGridFormButton,
 .OBGridFormButtonOver,
 .OBGridFormButtonFocused,
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <NAME><![CDATA[HTML Widget]]></NAME>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.18511]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.19003]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_MODULE_ID>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <NAME><![CDATA[User Interface Client Kernel]]></NAME>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.18511]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java	Wed Dec 12 11:19:29 2012 +0100
@@ -18,6 +18,8 @@
  */
 package org.openbravo.client.kernel.reference;
 
+import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
@@ -156,4 +158,10 @@
   public String getCellAlign() {
     return "left";
   }
+
+  public String getValueFromSQLDefault(ResultSet rs) throws SQLException {
+    Date date = rs.getDate(1);
+    return getClassicFormat().format(date);
+  }
+
 }
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Wed Dec 12 11:19:29 2012 +0100
@@ -20,6 +20,7 @@
 
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -134,6 +135,10 @@
     return "";
   }
 
+  public String getValueFromSQLDefault(ResultSet rs) throws SQLException {
+    return rs.getString(1);
+  }
+
   /**
    * Computes properties to initialize and set the field in a Smartclient form. This can be the
    * default value or the sets of values in the valuemap.
@@ -180,8 +185,9 @@
           ArrayList<String> params = new ArrayList<String>();
           String sql = parseSQL(defaultS, params);
           int indP = 1;
+          PreparedStatement ps = null;
           try {
-            PreparedStatement ps = OBDal.getInstance().getConnection(false).prepareStatement(sql);
+            ps = OBDal.getInstance().getConnection(false).prepareStatement(sql);
             for (String parameter : params) {
               String value = "";
               if (parameter.substring(0, 1).equals("#")) {
@@ -201,11 +207,17 @@
             }
             ResultSet rs = ps.executeQuery();
             if (rs.next()) {
-              columnValue = rs.getString(1);
+              columnValue = getValueFromSQLDefault(rs);
             }
           } catch (Exception e) {
             log.error("Error computing default value for field " + field.getName() + " of tab "
                 + field.getTab().getName(), e);
+          } finally {
+            try {
+              ps.close();
+            } catch (SQLException e) {
+              // won't happen
+            }
           }
         }
       }
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <NAME><![CDATA[Workspace & Widgets]]></NAME>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <NAME><![CDATA[Query/List Widget]]></NAME>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.18511]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.19003]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D844F3CC0003E-->  <NAME><![CDATA[Widgets Collection]]></NAME>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.18511]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.19003]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--FF8080812D842086012D845002070046-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D845002070046-->  <AD_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_MODULE_ID>
 <!--FF8080812D842086012D845002070046-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--FF8080812D842086012D845002070046-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080812D842086012D845002070046-->  <DEPENDANT_MODULE_NAME><![CDATA[Workspace & Widgets]]></DEPENDANT_MODULE_NAME>
 <!--FF8080812D842086012D845002070046-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <NAME><![CDATA[Payment Report]]></NAME>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.18511]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.19003]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_PROCESS.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_PROCESS.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -8,7 +8,7 @@
 <!--6AD04479EC134BD4826077F36B709876-->  <VALUE><![CDATA[paymentreport]]></VALUE>
 <!--6AD04479EC134BD4826077F36B709876-->  <NAME><![CDATA[Payment Report]]></NAME>
 <!--6AD04479EC134BD4826077F36B709876-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
-<!--6AD04479EC134BD4826077F36B709876-->  <HELP><![CDATA[The Payment Report facilitates the display of certain payments with the extensive filtering options. For more information refer to http://wiki.openbravo.com/wiki/Payment_Report]]></HELP>
+<!--6AD04479EC134BD4826077F36B709876-->  <HELP><![CDATA[The Payment Report displays Receivables and/or Payables information which can be filtered by an extensive set of available filters. ]]></HELP>
 <!--6AD04479EC134BD4826077F36B709876-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
 <!--6AD04479EC134BD4826077F36B709876-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
 <!--6AD04479EC134BD4826077F36B709876-->  <ISREPORT><![CDATA[Y]]></ISREPORT>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <NAME><![CDATA[Orders Awaiting Delivery]]></NAME>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.18511]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.19003]]></VERSION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <DESCRIPTION><![CDATA[Report displaying sales orders not shipped.]]></DESCRIPTION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <URL><![CDATA[http://forge.openbravo.com/projects/ordersawaitingdlivery]]></URL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.18511]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.18511]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813129ADA401312CA1222A0005-->  <NAME><![CDATA[Integration with Google APIs]]></NAME>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.18511]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.19003]]></VERSION>
 <!--FF8080813129ADA401312CA1222A0005-->  <DESCRIPTION><![CDATA[Integration with Google APIs]]></DESCRIPTION>
 <!--FF8080813129ADA401312CA1222A0005-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813129ADA401312CA1222A0005-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141BA0F7D0012-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.18511]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.19003]]></STARTVERSION>
 <!--FF8080813141B198013141BA0F7D0012-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813141B198013141B86DD70003-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B86DD70003-->  <NAME><![CDATA[OpenID Service Integration]]></NAME>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.18511]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.19003]]></VERSION>
 <!--FF8080813141B198013141B86DD70003-->  <DESCRIPTION><![CDATA[OpenID Service Integration]]></DESCRIPTION>
 <!--FF8080813141B198013141B86DD70003-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813141B198013141B86DD70003-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141B8B21B0006-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_MODULE_ID>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--FF8080813141B198013141B8B21B0006-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <NAME><![CDATA[JSON REST Webservice]]></NAME>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.18511]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.19003]]></VERSION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <DESCRIPTION><![CDATA[Provides a JSON REST webservice for CRUD service requests]]></DESCRIPTION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HELP><![CDATA[Provides a JSON REST webservice for CRUD service requests. Both the servlet implementation (receiving HTTP REST requests in JSON) as the backend processing are provided.]]></HELP>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravojsonrest]]></URL>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_MODULE_ID>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Wed Dec 12 11:19:29 2012 +0100
@@ -136,9 +136,11 @@
   // keeps track if during parsing the criteria one or more or's are encountered.
   private int orNesting = 0;
 
-  private int minutesTimeZoneDiff = 0;
+  private int UTCServerMinutesTimeZoneDiff = 0;
+  private int clientUTCMinutesTimeZoneDiff = 0;
 
   private SimpleDateFormat simpleDateFormat = JsonUtils.createDateFormat();
+  private SimpleDateFormat simpleDateTimeFormat = JsonUtils.createJSTimeFormat();
 
   // join associated entities
   private boolean joinAssociatedEntities = false;
@@ -333,7 +335,8 @@
       int serverMinutesTimezoneOffset = (now.get(Calendar.ZONE_OFFSET) + now
           .get(Calendar.DST_OFFSET)) / (1000 * 60);
       // Obtains the time zone offset between the server and the client
-      minutesTimeZoneDiff = serverMinutesTimezoneOffset - clientMinutesTimezoneOffset;
+      clientUTCMinutesTimeZoneDiff = clientMinutesTimezoneOffset;
+      UTCServerMinutesTimeZoneDiff = serverMinutesTimezoneOffset;
     }
 
     if (operator.equals(OPERATOR_ISNULL) || operator.equals(OPERATOR_NOTNULL)) {
@@ -664,9 +667,18 @@
       }
     } else if (Date.class.isAssignableFrom(property.getPrimitiveObjectType())) {
       try {
-        final Date date = simpleDateFormat.parse(value.toString());
+        Date date = null;
+        if (property.isDatetime()) {
+          date = simpleDateTimeFormat.parse(value.toString());
+        }
+        if (property.isDate()) {
+          date = simpleDateFormat.parse(value.toString());
+        }
+
         final Calendar calendar = Calendar.getInstance();
         calendar.setTime(date);
+        // Applies the time zone offset difference of the client
+        calendar.add(Calendar.MINUTE, clientUTCMinutesTimeZoneDiff);
         // move the date to the beginning of the day
         if (isGreaterOperator(operator)) {
           calendar.set(Calendar.HOUR, 0);
@@ -680,8 +692,8 @@
           calendar.set(Calendar.SECOND, 59);
           calendar.set(Calendar.MILLISECOND, 999);
         }
-        // Applies the time zone offset difference between the client and the server
-        calendar.add(Calendar.MINUTE, minutesTimeZoneDiff);
+        // Applies the time zone offset difference of the server
+        calendar.add(Calendar.MINUTE, -UTCServerMinutesTimeZoneDiff);
         return calendar.getTime();
       } catch (Exception e) {
         throw new IllegalArgumentException(e);
@@ -1041,8 +1053,8 @@
     }
 
     // make sure that the join clauses are computed
+    getOrderByClause();
     getWhereClause();
-    getOrderByClause();
 
     final StringBuilder sb = new StringBuilder();
     if (getMainAlias() != null) {
@@ -1217,13 +1229,22 @@
     String properties[] = value.split("\\.");
     if (properties.length > 2) {
       for (JoinDefinition join : joinDefinitions) {
-        if (compare.contains("join")) {
-          if (properties[0].equalsIgnoreCase(join.ownerAlias)) {
-            return join.joinAlias + DalUtil.DOT + properties[properties.length - 1];
+        if (compare.startsWith(getMainAlias())) {
+          if (compare.equalsIgnoreCase(getMainAlias() + DalUtil.DOT + join.property.toString())) {
+            query = join.joinAlias + DalUtil.DOT + properties[properties.length - 1];
           }
+
         } else {
-          if (compare.equalsIgnoreCase(getMainAlias() + DalUtil.DOT + join.property)) {
-            return join.joinAlias + DalUtil.DOT + properties[properties.length - 1];
+          String joinStatement = join.getJoinStatement();
+          String[] joinElement = joinStatement.split("as");
+          if (joinElement[0] != null) {
+            String entities[] = joinElement[0].split(" ");
+            if (entities[entities.length - 1] != null) {
+              String entityToCompare = entities[entities.length - 1];
+              if (compare.equalsIgnoreCase(entityToCompare)) {
+                query = join.joinAlias + DalUtil.DOT + properties[properties.length - 1];
+              }
+            }
           }
         }
       }
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <NAME><![CDATA[User Interface Selector]]></NAME>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <DESCRIPTION><![CDATA[Provides a selector with a suggestion box and popup grid window]]></DESCRIPTION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HELP><![CDATA[The Openbravo selector provides new selector functionality which is used inside of existing Openbravo forms. The selector is mainly used for supporting foreign key references in the user interface. The selector combines both suggestion box behavior with a popup grid.]]></HELP>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <URL><![CDATA[http://forge.openbravo.com/projects/selector]]></URL>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.18511]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Dec 12 11:19:29 2012 +0100
@@ -407,6 +407,8 @@
     if (!newValue) {
       this.setValueFromRecord(null);
     }
+    //Setting the element value again to align the cursor position correctly.
+    this.setElementValue(newValue);
   },
 
   setPickListWidth: function () {
@@ -626,6 +628,9 @@
     if (this.form.getFocusItem() !== this && !this.form.view.isShowingForm && this.getEnteredValue() === '' && this.savedEnteredValue) {
       this.setElementValue(this.savedEnteredValue);
       delete this.savedEnteredValue;
+    } else if (this.form.view.isShowingForm && this.getEnteredValue() === '' && this.savedEnteredValue) {
+      this.setElementValue(this.savedEnteredValue);
+      delete this.savedEnteredValue;
     }
 
     var criteria = this.getPickListFilterCriteria(),
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></NAME>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.18511]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.19003]]></VERSION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <DESCRIPTION><![CDATA[Skin module to proper visualization of classic windows inside the MDI interface]]></DESCRIPTION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HELP><![CDATA[With this skin module the classic windows styles will display in a way more coherent with the new 3.00 styles]]></HELP>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <URL><![CDATA[www.openbravo.com]]></URL>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_MODULE_ID>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <NAME><![CDATA[Smartclient]]></NAME>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.18511]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.19003]]></VERSION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <DESCRIPTION><![CDATA[SmartClient libraries for use within Openbravo]]></DESCRIPTION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HELP><![CDATA[This module contains the SmartClient libraries for usage by other modules. It also contains some simple test pages to validate that SmartClient is working correctly. Also contains generic Openbravo SmartClient components]]></HELP>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <URL><![CDATA[http://forge.openbravo.com/projects/obsmartclient]]></URL>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js	Wed Dec 12 11:19:29 2012 +0100
@@ -18,9 +18,11 @@
 return v.present=="true"||v.present.charAt(0)=="$"};isc.getOptionalModule=function(_1){return isc.$b[_1]};isc.$d=window.isc_useSimpleNames;if(isc.$d==null)isc.$d=true;if(window.OpenAjax){isc.$e=isc.versionNumber.replace(/[a-zA-Z_]+/,".0");OpenAjax.registerLibrary("SmartClient","http://smartclient.com/SmartClient",isc.$e,{namespacedMode:!isc.$d,iscVersion:isc.version,buildDate:isc.buildDate,licenseType:isc.licenseType,licenseCompany:isc.licenseCompany,licenseSerialNumber:isc.licenseSerialNumber});OpenAjax.registerGlobals("SmartClient",["isc"])}
 isc.$f=window.isc_useLongDOMIDs;isc.$g="isc.";isc.addGlobal=function(_1,_2){if(_1.indexOf(isc.$g)==0)_1=_1.substring(4);isc[_1]=_2;if(isc.$d)window[_1]=_2}
 isc.onLine=true;isc.isOffline=function(){return!isc.onLine};isc.goOffline=function(){isc.onLine=false};isc.goOnline=function(){isc.onLine=true};if(window.addEventListener){window.addEventListener("online",isc.goOnline,false);window.addEventListener("offline",isc.goOffline,false)}
-isc.addGlobal("Browser",{isSupported:false});isc.Browser.isOpera=(navigator.appName=="Opera"||navigator.userAgent.indexOf("Opera")!=-1);isc.Browser.isNS=(navigator.appName=="Netscape"&&!isc.Browser.isOpera);isc.Browser.isIE=(navigator.appName=="Microsoft Internet Explorer"&&!isc.Browser.isOpera);isc.Browser.isMSN=(isc.Browser.isIE&&navigator.userAgent.indexOf("MSN")!=-1);isc.Browser.minorVersion=parseFloat(isc.Browser.isIE?navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5):navigator.appVersion);isc.Browser.version=parseInt(isc.Browser.minorVersion);isc.Browser.isIE6=isc.Browser.isIE&&isc.Browser.version<=6;isc.Browser.isMoz=(navigator.userAgent.indexOf("Gecko")!=-1)&&(navigator.userAgent.indexOf("Safari")==-1)&&(navigator.userAgent.indexOf("AppleWebKit")==-1);isc.Browser.isCamino=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Camino/")!=-1);if(isc.Browser.isCamino){isc.Browser.caminoVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Camino/")+7)}
+isc.addGlobal("Browser",{isSupported:false});isc.Browser.isOpera=(navigator.appName=="Opera"||navigator.userAgent.indexOf("Opera")!=-1);isc.Browser.isNS=(navigator.appName=="Netscape"&&!isc.Browser.isOpera);isc.Browser.isIE=(navigator.appName=="Microsoft Internet Explorer"&&!isc.Browser.isOpera);isc.Browser.isMSN=(isc.Browser.isIE&&navigator.userAgent.indexOf("MSN")!=-1);isc.Browser.minorVersion=parseFloat(isc.Browser.isIE?navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5):navigator.appVersion);
+if(!isc.Browser.isIE)(function(){var needle,pos;if(navigator.appVersion){needle="Version/";pos=navigator.appVersion.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(navigator.appVersion.substring(pos+needle.length));return;}}var ua=navigator.userAgent;needle="Chrome/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}needle="Camino/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}needle="Firefox/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}if(ua.indexOf("Opera/")>=0){needle="Version/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}else{needle="Opera/";pos=ua.indexOf(needle);isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}}})();
+isc.Browser.version=parseInt(isc.Browser.minorVersion);isc.Browser.isIE6=isc.Browser.isIE&&isc.Browser.version<=6;isc.Browser.isMoz=(navigator.userAgent.indexOf("Gecko")!=-1)&&(navigator.userAgent.indexOf("Safari")==-1)&&(navigator.userAgent.indexOf("AppleWebKit")==-1);isc.Browser.isCamino=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Camino/")!=-1);if(isc.Browser.isCamino){isc.Browser.caminoVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Camino/")+7)}
 isc.Browser.isFirefox=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Firefox/")!=-1);if(isc.Browser.isFirefox){isc.Browser.firefoxVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox/")+8)}
-if(isc.Browser.isMoz){isc.Browser.$h=navigator.userAgent.indexOf("Gecko/")+6;isc.Browser.geckoVersion=parseInt(navigator.userAgent.substring(isc.Browser.$h,isc.Browser.$h+8));if(isc.Browser.isFirefox){if(isc.Browser.firefoxVersion.match(/^1\.0/))isc.Browser.geckoVersion=20050915;else if(isc.Browser.firefoxVersion.match(/^2\.0/))isc.Browser.geckoVersion=20071108}}
+if(isc.Browser.isMoz){isc.Browser.$h=navigator.userAgent.indexOf("Gecko/")+6;isc.Browser.geckoVersion=parseInt(navigator.userAgent.substring(isc.Browser.$h,isc.Browser.$h+8));if(isc.Browser.isFirefox){if(isc.Browser.firefoxVersion.match(/^1\.0/))isc.Browser.geckoVersion=20050915;else if(isc.Browser.firefoxVersion.match(/^2\.0/))isc.Browser.geckoVersion=20071108}if(isc.Browser.version>=17)isc.Browser.geckoVersion=20121121;}
 isc.Browser.isStrict=document.compatMode=="CSS1Compat";if(isc.Browser.isStrict&&isc.Browser.isMoz){isc.Browser.$i=document.doctype.publicId;isc.Browser.$j=document.doctype.systemId}
 isc.Browser.isTransitional=/.*(Transitional|Frameset)/.test((document.all&&document.all[0]&&document.all[0].nodeValue)||(document.doctype&&document.doctype.publicId));isc.Browser.isIE7=isc.Browser.isIE&&isc.Browser.version==7;isc.Browser.isIE8=isc.Browser.isIE&&isc.Browser.version>=8&&document.documentMode==8
 isc.Browser.isIE8Strict=isc.Browser.isIE&&(isc.Browser.isStrict&&document.documentMode==8)||document.documentMode>8;isc.Browser.isIE9=isc.Browser.isIE&&isc.Browser.version>=9&&document.documentMode>=9;isc.Browser.isAIR=(navigator.userAgent.indexOf("AdobeAIR")!=-1);isc.Browser.AIRVersion=(isc.Browser.isAIR?navigator.userAgent.substring(navigator.userAgent.indexOf("AdobeAir/")+9):null);isc.Browser.isWebKit=navigator.userAgent.indexOf("WebKit")!=-1;isc.Browser.isSafari=isc.Browser.isAIR||navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("AppleWebKit")!=-1;isc.Browser.isChrome=isc.Browser.isSafari&&(navigator.userAgent.indexOf("Chrome/")!=-1);if(isc.Browser.isSafari){if(isc.Browser.isAIR){isc.Browser.safariVersion=530}else{if(navigator.userAgent.indexOf("Safari/")!=-1){isc.Browser.rawSafariVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Safari/")+7)}else if(navigator.userAgent.indexOf("AppleWebKit/")!=-1){isc.Browser.rawSafariVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("AppleWebKit/")+12)}else{isc.Browser.rawSafariVersion="530"}
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_History.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_History.js	Wed Dec 12 11:19:29 2012 +0100
@@ -18,9 +18,11 @@
 return v.present=="true"||v.present.charAt(0)=="$"};isc.getOptionalModule=function(_1){return isc.$b[_1]};isc.$d=window.isc_useSimpleNames;if(isc.$d==null)isc.$d=true;if(window.OpenAjax){isc.$e=isc.versionNumber.replace(/[a-zA-Z_]+/,".0");OpenAjax.registerLibrary("SmartClient","http://smartclient.com/SmartClient",isc.$e,{namespacedMode:!isc.$d,iscVersion:isc.version,buildDate:isc.buildDate,licenseType:isc.licenseType,licenseCompany:isc.licenseCompany,licenseSerialNumber:isc.licenseSerialNumber});OpenAjax.registerGlobals("SmartClient",["isc"])}
 isc.$f=window.isc_useLongDOMIDs;isc.$g="isc.";isc.addGlobal=function(_1,_2){if(_1.indexOf(isc.$g)==0)_1=_1.substring(4);isc[_1]=_2;if(isc.$d)window[_1]=_2}
 isc.onLine=true;isc.isOffline=function(){return!isc.onLine};isc.goOffline=function(){isc.onLine=false};isc.goOnline=function(){isc.onLine=true};if(window.addEventListener){window.addEventListener("online",isc.goOnline,false);window.addEventListener("offline",isc.goOffline,false)}
-isc.addGlobal("Browser",{isSupported:false});isc.Browser.isOpera=(navigator.appName=="Opera"||navigator.userAgent.indexOf("Opera")!=-1);isc.Browser.isNS=(navigator.appName=="Netscape"&&!isc.Browser.isOpera);isc.Browser.isIE=(navigator.appName=="Microsoft Internet Explorer"&&!isc.Browser.isOpera);isc.Browser.isMSN=(isc.Browser.isIE&&navigator.userAgent.indexOf("MSN")!=-1);isc.Browser.minorVersion=parseFloat(isc.Browser.isIE?navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5):navigator.appVersion);isc.Browser.version=parseInt(isc.Browser.minorVersion);isc.Browser.isIE6=isc.Browser.isIE&&isc.Browser.version<=6;isc.Browser.isMoz=(navigator.userAgent.indexOf("Gecko")!=-1)&&(navigator.userAgent.indexOf("Safari")==-1)&&(navigator.userAgent.indexOf("AppleWebKit")==-1);isc.Browser.isCamino=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Camino/")!=-1);if(isc.Browser.isCamino){isc.Browser.caminoVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Camino/")+7)}
+isc.addGlobal("Browser",{isSupported:false});isc.Browser.isOpera=(navigator.appName=="Opera"||navigator.userAgent.indexOf("Opera")!=-1);isc.Browser.isNS=(navigator.appName=="Netscape"&&!isc.Browser.isOpera);isc.Browser.isIE=(navigator.appName=="Microsoft Internet Explorer"&&!isc.Browser.isOpera);isc.Browser.isMSN=(isc.Browser.isIE&&navigator.userAgent.indexOf("MSN")!=-1);isc.Browser.minorVersion=parseFloat(isc.Browser.isIE?navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5):navigator.appVersion);
+if(!isc.Browser.isIE)(function(){var needle,pos;if(navigator.appVersion){needle="Version/";pos=navigator.appVersion.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(navigator.appVersion.substring(pos+needle.length));return;}}var ua=navigator.userAgent;needle="Chrome/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}needle="Camino/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}needle="Firefox/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}if(ua.indexOf("Opera/")>=0){needle="Version/";pos=ua.indexOf(needle);if(pos>=0){isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}else{needle="Opera/";pos=ua.indexOf(needle);isc.Browser.minorVersion=parseFloat(ua.substring(pos+needle.length));return;}}})();
+isc.Browser.version=parseInt(isc.Browser.minorVersion);isc.Browser.isIE6=isc.Browser.isIE&&isc.Browser.version<=6;isc.Browser.isMoz=(navigator.userAgent.indexOf("Gecko")!=-1)&&(navigator.userAgent.indexOf("Safari")==-1)&&(navigator.userAgent.indexOf("AppleWebKit")==-1);isc.Browser.isCamino=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Camino/")!=-1);if(isc.Browser.isCamino){isc.Browser.caminoVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Camino/")+7)}
 isc.Browser.isFirefox=(isc.Browser.isMoz&&navigator.userAgent.indexOf("Firefox/")!=-1);if(isc.Browser.isFirefox){isc.Browser.firefoxVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox/")+8)}
-if(isc.Browser.isMoz){isc.Browser.$h=navigator.userAgent.indexOf("Gecko/")+6;isc.Browser.geckoVersion=parseInt(navigator.userAgent.substring(isc.Browser.$h,isc.Browser.$h+8));if(isc.Browser.isFirefox){if(isc.Browser.firefoxVersion.match(/^1\.0/))isc.Browser.geckoVersion=20050915;else if(isc.Browser.firefoxVersion.match(/^2\.0/))isc.Browser.geckoVersion=20071108}}
+if(isc.Browser.isMoz){isc.Browser.$h=navigator.userAgent.indexOf("Gecko/")+6;isc.Browser.geckoVersion=parseInt(navigator.userAgent.substring(isc.Browser.$h,isc.Browser.$h+8));if(isc.Browser.isFirefox){if(isc.Browser.firefoxVersion.match(/^1\.0/))isc.Browser.geckoVersion=20050915;else if(isc.Browser.firefoxVersion.match(/^2\.0/))isc.Browser.geckoVersion=20071108}if(isc.Browser.version>=17)isc.Browser.geckoVersion=20121121;}
 isc.Browser.isStrict=document.compatMode=="CSS1Compat";if(isc.Browser.isStrict&&isc.Browser.isMoz){isc.Browser.$i=document.doctype.publicId;isc.Browser.$j=document.doctype.systemId}
 isc.Browser.isTransitional=/.*(Transitional|Frameset)/.test((document.all&&document.all[0]&&document.all[0].nodeValue)||(document.doctype&&document.doctype.publicId));isc.Browser.isIE7=isc.Browser.isIE&&isc.Browser.version==7;isc.Browser.isIE8=isc.Browser.isIE&&isc.Browser.version>=8&&document.documentMode==8
 isc.Browser.isIE8Strict=isc.Browser.isIE&&(isc.Browser.isStrict&&document.documentMode==8)||document.documentMode>8;isc.Browser.isIE9=isc.Browser.isIE&&isc.Browser.version>=9&&document.documentMode>=9;isc.Browser.isAIR=(navigator.userAgent.indexOf("AdobeAIR")!=-1);isc.Browser.AIRVersion=(isc.Browser.isAIR?navigator.userAgent.substring(navigator.userAgent.indexOf("AdobeAir/")+9):null);isc.Browser.isWebKit=navigator.userAgent.indexOf("WebKit")!=-1;isc.Browser.isSafari=isc.Browser.isAIR||navigator.userAgent.indexOf("Safari")!=-1||navigator.userAgent.indexOf("AppleWebKit")!=-1;isc.Browser.isChrome=isc.Browser.isSafari&&(navigator.userAgent.indexOf("Chrome/")!=-1);if(isc.Browser.isSafari){if(isc.Browser.isAIR){isc.Browser.safariVersion=530}else{if(navigator.userAgent.indexOf("Safari/")!=-1){isc.Browser.rawSafariVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Safari/")+7)}else if(navigator.userAgent.indexOf("AppleWebKit/")!=-1){isc.Browser.rawSafariVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("AppleWebKit/")+12)}else{isc.Browser.rawSafariVersion="530"}
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Dec 12 11:19:29 2012 +0100
@@ -536,6 +536,9 @@
   },
 
   isDisabled: function (ignoreTemporaryDisabled) {
+    if (!this.form) {
+      return false;
+    }
     // disabled if the property can not be updated and the form or record is new
     // explicitly comparing with false as it is only set for edit form fields
     if (this.updatable === false && !(this.form.isNew || this.form.getValue('_new'))) {
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <NAME><![CDATA[Standard Roles]]></NAME>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.18511]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.19003]]></VERSION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <DESCRIPTION><![CDATA[Pre-configured collection of standard ERP roles]]></DESCRIPTION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HELP><![CDATA[This dataset contains the following roles with their access to corresponding Openbravo entities - windows, reports, actions.
 * Employee - Any person of the enterprise
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -6,7 +6,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <NAME><![CDATA[Openbravo 3.0 Framework]]></NAME>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.18511]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <DESCRIPTION><![CDATA[Openbravo 3.0 Framework]]></DESCRIPTION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HELP><![CDATA[Contains all the components required to run the Openbravo 3.0 framework]]></HELP>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravov30framework]]></URL>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -7,7 +7,7 @@
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--025B181F63CA47B48A920F6983242390-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.18511]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
 <!--025B181F63CA47B48A920F6983242390-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_DEPENDENT_MODULE_ID>
-<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.18511]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.19003]]></STARTVERSION>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDANT_MODULE_NAME><![CDATA[Query/List Widget]]></DEPENDANT_MODULE_NAME>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--5B72D24032DD4879A950194139D961B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--5B72D24032DD4879A950194139D961B6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_DEPENDENT_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_DEPENDENT_MODULE_ID>
-<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.18511]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.19003]]></STARTVERSION>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDANT_MODULE_NAME><![CDATA[HTML Widget]]></DEPENDANT_MODULE_NAME>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.18511]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_DEPENDENT_MODULE_ID>
-<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.18511]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDANT_MODULE_NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></DEPENDANT_MODULE_NAME>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -133,7 +133,7 @@
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.18511]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -147,7 +147,7 @@
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.18511]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -161,7 +161,7 @@
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.18511]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3/src-db/database/configScript.xml	Thu Nov 22 10:09:05 2012 +0100
+++ b/modules/org.openbravo.v3/src-db/database/configScript.xml	Wed Dec 12 11:19:29 2012 +0100
@@ -65,10 +65,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_TAB" columnname="ISACTIVE" pkRow="800075">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_TAB" columnname="ISACTIVE" pkRow="800219">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -1101,50 +1097,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7788">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7789">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7790">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7792">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7793">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7794">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7795">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7796">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7797">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7800">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7801">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7802">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -1177,30 +1129,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7823">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7824">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7825">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7826">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7827">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7828">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="7829">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -1453,22 +1381,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="801367">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="801368">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="801369">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="801370">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="801374">
       <oldValue><![CDATA[Y]]></oldValue>