[Characteristics]Merge with pi rev 20952:1724b65a331a
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 07 Aug 2013 09:31:14 +0200
changeset 20963 a0563a002814
parent 20962 0445bb45bd54 (current diff)
parent 20855 1724b65a331a (diff)
child 20964 defaa72c91e5
[Characteristics]Merge with pi rev 20952:1724b65a331a
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
referencedata/sampledata/F_B_International_Group.xml
referencedata/sampledata/QA_Testing.xml
src-db/database/model/functions/C_INVOICE_POST.xml
src-db/database/model/functions/C_ORDER_POST1.xml
src-db/database/model/functions/M_INOUT_POST.xml
src-db/database/model/tables/M_PRODUCT.xml
src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
src-db/database/model/triggers/M_TRANSACTION_TRG2.xml
src-db/database/model/views/M_CREATEPOLINES_PE_V.xml
src-db/database/model/views/M_PRODUCT_PRICE_WAREHOUSE_V.xml
src-db/database/model/views/M_PRODUCT_STOCK_V.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_PROCESS_PARA.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_REF_TABLE.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
src-db/database/sourcedata/OBUISEL_SELECTOR.xml
src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java
src/org/openbravo/erpCommon/utility/ImageToDatabaseLoader.java
--- a/.hgsigs	Tue Aug 06 12:25:00 2013 +0200
+++ b/.hgsigs	Wed Aug 07 09:31:14 2013 +0200
@@ -112,3 +112,9 @@
 dc219eb12d7e3a434b4d3151a93597d5292f2c06 0 iEYEABECAAYFAlGCVCkACgkQCX/oGf+2qkPi6gCeJKtfZ58WQOqlRHoY0X3K+6yxpwcAoJr+iFJrxNhzylyJuAiZx1Ewsdti
 d6967f5f10c642017a6e2be5206cb4d44926cdc5 0 iEYEABECAAYFAlGbmiwACgkQCX/oGf+2qkMWbACgpTdvV7HBnS+rgaGKicLXOxWY3oMAniRBr+lgXOABzgOP4QsT6Yhww83h
 7c487ba0b222d5d9540b24223a71e62efaab1449 0 iEYEABECAAYFAlGaRDIACgkQCX/oGf+2qkMc2wCdFY+72j0R/gz/WVnIwnnPxJH1ljQAoJqjDgZUoszxKo/Gk567MXvsppVN
+673a31036fb2354aecc062b8a8fe3399b0c39192 0 iEYEABECAAYFAlHINdcACgkQCX/oGf+2qkMLNACdGjH1WVLG8nG6btOUq9pIgcwKnCUAoNZS4rpHIx7ARjx87ha6wYyWJYEE
+859de1db934381df3b1eb0e863ec19a887565331 0 iEYEABECAAYFAlHbj5AACgkQCX/oGf+2qkMgJACgz7U/fVr1o5M08eTFaJQDldJ5xBoAoI6O81kGY5mmurordwIpiYKlT7wp
+b0634b11086a05db9d54275a05c64f23bf12f805 0 iEYEABECAAYFAlHBMSwACgkQCX/oGf+2qkOR+ACcDWGNCcZXny0x54Jkrc744UEpy3kAn3L1sDVMcfqraHG8ierwEcnOL9S3
+5efe3c4189c7db9b2ea2bdff73de3256217df045 0 iEYEABECAAYFAlHNMRQACgkQCX/oGf+2qkPkMACfSJJJM2kdf89Up4kfEbCZW/smRIEAoKbC5gBEuEKdflRQU5ber6TXErjQ
+b92ea05d4f9df44475cc35b00682862d15f7880d 0 iEYEABECAAYFAlHfwu0ACgkQCX/oGf+2qkNDwgCeKTGDEeOXONV0dU9Br2RZAwEOFsMAn3okxXa3sdQk63JiB5PfPtBF6VLI
+d49b59c48d5f7d47d9d9505d2cf0ea5ea89b7070 0 iEYEABECAAYFAlHjfZMACgkQCX/oGf+2qkNnbgCg33P3BC6aXRRMGxtrdjpaugceKtUAoO6Nyy5jm/dx2xWnWBzg8u+F48BJ
--- a/.hgtags	Tue Aug 06 12:25:00 2013 +0200
+++ b/.hgtags	Wed Aug 07 09:31:14 2013 +0200
@@ -123,3 +123,9 @@
 56826f5230e456121cf043d90513707beaf6b473 3.0MP22.2
 32eb242529bb23a5397ef58aab85d9e42965f08e 3.0MP22.3
 93ebf694603919f347a7bdbb5388045094da2492 3.0MP23
+e33bac4c2962faa7a58189eba71594b4ede58a8b 3.0MP23.1
+af209003923492e8a18062c4dc58711d445345ed 3.0MP23.2
+692d465ddec51a2cf0798735abe7fa33436ac1ec 3.0MP24
+fdd2929b3158b981bad058be133c560874629a1c 3.0MP24.1
+0e89a754cf5593dcec90d925c25534be68c38873 3.0MP24.2
+895ac3b1f59a66db37a45476a6a82cdca0564ee8 3.0MP25
--- a/build.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/build.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2001-2012 Openbravo SLU
+* All portions are Copyright (C) 2001-2013 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -371,6 +371,13 @@
     <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true" />
   </target>
 
+  <target name="migrate.attachments" depends="init">
+    <taskdef name="MigrateAttachments" classname="org.openbravo.erpCommon.utility.MigrateAttachments" >
+      <classpath refid="project.class.path" />
+    </taskdef>
+    <MigrateAttachments/>
+  </target>
+
   <target name="smartbuild" depends="init">
     <property name="smart.mode" value="true" />
     <property name="onlyIfModified" value="true" />
@@ -603,12 +610,12 @@
     />    
   </target>
 
-  <target name="export.sample.data" depends="code.rev">
-    <ant dir="${base.src}" target="export.sample.data" inheritAll="true" inheritRefs="true" />
+  <target name="export.sample.data.old" depends="code.rev">
+    <ant dir="${base.src}" target="export.sample.data.old" inheritAll="true" inheritRefs="true" />
   </target>
 
-  <target name="import.sample.data" depends="code.rev">
-    <ant dir="${base.src}" target="import.sample.data" inheritAll="true" inheritRefs="true" />
+  <target name="import.sample.data.old" depends="code.rev">
+    <ant dir="${base.src}" target="import.sample.data.old" inheritAll="true" inheritRefs="true" />
   </target>
 
   <target name="compile.src" depends="init">
@@ -700,7 +707,6 @@
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
 
     <antcall target="import.sample.data" />
-    <antcall target="load.logoimages" />
     <updatesystemstatus v="RB51"/> 
     <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
 
@@ -759,6 +765,14 @@
     <ant dir="${base.db}" target="export.config.script" inheritAll="true" inheritRefs="true" />
   </target>
 
+  <target name="export.sample.data" depends="init, core.lib">
+    <ant dir="${base.db}" target="export.sample.data" inheritAll="true" inheritRefs="true" />
+  </target>
+
+  <target name="import.sample.data" depends="init, core.lib">
+    <ant dir="${base.db}" target="import.sample.data" inheritAll="true" inheritRefs="true" />
+  </target>
+
   <target name="db.apply.modules" if="apply.modules.on.update">
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
   </target>
@@ -767,7 +781,6 @@
     <antcall target="generate.entities" />
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
     <antcall target="import.sample.data" />
-    <antcall target="load.logoimages" />
   </target>
 
 
@@ -1057,7 +1070,7 @@
   </target>
 
   <target name="setup" depends="setup.check.os, setup.check.arch, setup.exists.test" unless="setup.exists">
-    <get src="https://dev.openbravo.com/svn/packaging/setup/output/setup-properties-${osname}${osarch}.${bin.ext}" dest="config/setup-properties-${osname}${osarch}.${bin.ext}" verbose="true" />
+    <get src="https://code.openbravo.com/tools/rm/erp-setup-tool/raw-file/tip/setup/output/setup-properties-${osname}${osarch}.${bin.ext}" dest="config/setup-properties-${osname}${osarch}.${bin.ext}" verbose="true" />
 
     <chmod file="config/setup-properties-${osname}${osarch}.${bin.ext}" perm="+x" />
   </target>
@@ -1124,15 +1137,6 @@
     </loadfile>
   </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>
-  
   <target name="validate.wad">
     <ant dir="${base.src}" target="wadvalidation" inheritAll="true" inheritRefs="true" />
   </target>
--- a/lib/README	Tue Aug 06 12:25:00 2013 +0200
+++ b/lib/README	Wed Aug 07 09:31:14 2013 +0200
@@ -1,3 +1,3 @@
 When adding or removing libraries to Openbravo ERP please update this page
-with your changes: 
+with your changes:
 http://wiki.openbravo.com/wiki/Openbravo_Libraries
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -69,6 +69,7 @@
 v_Line FIN_FINACC_TRANSACTION.LINE%TYPE;
 v_count NUMBER;
 v_PaymentPriority VARCHAR(32);
+v_InvoicePaid CHAR(1);
 v_creditmultiplier NUMBER:= 1;
 v_lang AD_User.Default_AD_Language%TYPE;
 v_orderno C_Order.DocumentNo%TYPE:=null;
@@ -132,6 +133,27 @@
 
   -- complete invoice
   IF (p_docaction = 'CO') THEN
+    -- Do not add payment for the reversal invoice if the voided invoice is not paid
+    SELECT COUNT(*)
+    INTO v_Count
+    FROM C_Invoice_Reverse
+    WHERE C_Invoice_ID = p_record_id;
+
+    IF(v_Count <> 0) THEN
+	SELECT COALESCE(ispaid, 'Y')
+	INTO v_InvoicePaid
+	FROM C_Invoice
+	WHERE C_Invoice_ID IN (
+		SELECT Reversed_C_Invoice_ID
+		FROM C_Invoice_Reverse
+		WHERE C_Invoice_Id = p_record_id
+	);
+
+	IF (v_InvoicePaid = 'N') THEN
+		RETURN;
+	END IF;
+    END IF;
+    	
     -- Checking Payment Method ID is available
     IF(v_PaymentMethod IS NULL) THEN
       RAISE_APPLICATION_ERROR(-20000, '@APRM_PAYMENTMETHOD_MISSING@');
@@ -611,11 +633,54 @@
               IF (v_PaymentDocumentNo IS NULL) THEN
                 AD_Sequence_Doc('DocumentNo_FIN_Payment', v_client_id, 'Y', v_PaymentDocumentNo) ;
               END IF;
+
+              --Gets the financial account currency
+              SELECT C_Currency_ID 
+              INTO v_finacct_currency 
+              FROM FIN_Financial_Account 
+              WHERE FIN_Financial_Account_id = v_Financial_Account_ID;
+
+              --Gets the Price precision
+              SELECT priceprecision 
+              INTO v_PricePr 
+              FROM C_CURRENCY 
+              WHERE c_currency_id = v_finacct_currency;
+
+              --Check for the exchange rate at document level and get the rate
+              SELECT COUNT(rate)
+              INTO v_count
+              FROM C_Conversion_Rate_Document
+              WHERE C_Invoice_ID = p_record_id
+	      AND C_Currency_ID = cur_paymentschedule.C_CURRENCY_ID
+	      AND C_Currency_ID_To = v_finacct_currency;
+	      
+              IF(v_count > 0) THEN
+	        SELECT rate
+	        INTO v_rate
+	        FROM C_Conversion_Rate_Document
+	        WHERE C_Invoice_ID = p_record_id
+	        AND C_Currency_ID = cur_paymentschedule.C_CURRENCY_ID
+	        AND C_Currency_ID_To = v_finacct_currency; 
+	      ELSE
+	        v_rate := 0;
+	      END IF;
+	      --The financial account currency and payment currency are different and the financial account is not configured to accept payment from different currency
+	      IF (v_finacct_currency<>cur_paymentschedule.C_CURRENCY_ID AND cur_finaccpaymentmethod.multicurrency='N') THEN
+	        RAISE_APPLICATION_ERROR(-20000,'@APRM_NoFinancialAccountDefined@');
+	      --The financial account currency and payment currency are different and the financial account is not configured to accept payment from different currency
+	      --and there is no exchange rate defined at document level
+              ELSIF (v_finacct_currency<>cur_paymentschedule.C_CURRENCY_ID AND cur_finaccpaymentmethod.multicurrency='Y' AND v_rate = 0) THEN
+                v_rate := C_CURRENCY_RATE(cur_paymentschedule.C_CURRENCY_ID, v_finacct_currency, cur_paymentschedule.DUEDATE, NULL, v_client_id, cur_paymentschedule.AD_ORG_ID );
+              --default exchange rate to 1
+              ELSIF (v_rate = 0) THEN
+                v_rate := 1;
+              END IF;
+
               INSERT INTO fin_payment(
                 fin_payment_id, ad_client_id, ad_org_id, created, createdby,
                 updated, updatedby, isactive, isreceipt, c_bpartner_id, paymentdate,
                 c_currency_id, amount, writeoffamt,
-                finacc_txn_amount,fin_paymentmethod_id, documentno,
+                finacc_txn_amount, finacc_txn_convert_rate, fin_paymentmethod_id, documentno,
                 referenceno,
                 status,
                 processed, processing, posted, description,
@@ -625,7 +690,7 @@
               VALUES (v_FIN_PAYMENT_ID, v_client_id, cur_paymentschedule.AD_ORG_ID, now(), p_user,
                 now(), p_user, 'Y', v_IsSOTrx, v_bpartner_id, cur_paymentschedule.DUEDATE,
                 cur_paymentschedule.C_CURRENCY_ID, COALESCE(cur_paymentschedule.OUTSTANDINGAMT,0), 0,
-                COALESCE(cur_paymentschedule.OUTSTANDINGAMT,0), cur_paymentschedule.FIN_PAYMENTMETHOD_ID, v_PaymentDocumentNo,
+                ROUND(COALESCE(cur_paymentschedule.OUTSTANDINGAMT,0)*v_rate, v_PricePr), v_rate, cur_paymentschedule.FIN_PAYMENTMETHOD_ID, v_PaymentDocumentNo,
                 '',
                 CASE
                   WHEN cur_finaccpaymentmethod.ExecutionType = 'A' THEN 'RPAE'
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -16,7 +16,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 Openbravo SLU
+* All portions are Copyright (C) 2013 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -114,48 +114,50 @@
         RAISE_APPLICATION_ERROR(-20000, '@APRM_ORDER_MAN_PAYMENTS@');
       END IF;
       v_payment_schedule_order := get_uuid();
-      INSERT INTO fin_payment_schedule
-      (
-        fin_payment_schedule_id, ad_client_id, ad_org_id, isactive,
-        created, createdby, updated, updatedby,
-        c_invoice_id, c_currency_id, c_order_id,
-        fin_paymentmethod_id, amount, duedate, expecteddate,
-        outstandingamt, fin_payment_priority_id
-       )
-      VALUES
-      (
-        v_payment_schedule_order, v_Client_ID, v_Org_ID, 'Y',
-        now(), p_user, now(), p_user,
-        null, v_currency_id, p_record_id,
-        v_paymentmethod_id, v_grandtotal, v_orderdate, v_orderdate,
-        v_grandtotal, v_PaymentPriority
-      );
+      IF v_grandtotal <> 0 THEN
+	INSERT INTO fin_payment_schedule
+	(
+	  fin_payment_schedule_id, ad_client_id, ad_org_id, isactive,
+	  created, createdby, updated, updatedby,
+	  c_invoice_id, c_currency_id, c_order_id,
+	  fin_paymentmethod_id, amount, duedate, expecteddate,
+	  outstandingamt, fin_payment_priority_id
+        )
+        VALUES
+        (
+          v_payment_schedule_order, v_Client_ID, v_Org_ID, 'Y',
+          now(), p_user, now(), p_user,
+          null, v_currency_id, p_record_id,
+          v_paymentmethod_id, v_grandtotal, v_orderdate, v_orderdate,
+          v_grandtotal, v_PaymentPriority
+        );
 
-      v_pendingamount := v_grandtotal;
-      --If exist a payment plan for an invoice it will always be an invoice generated completing this order
-      --so we can asume that all fin_payment_scheduledetail records are also related to the order.
-      --With the same asumption if the invoice has some paid amount it will always be by a paymetn for the whole
-      --amount generated on the invoice completion, so we can safely set as paid amount the whole amount of the
-      --payment plan.
-      FOR cur_invoicepayments IN (
-        SELECT distinct psd.fin_payment_scheduledetail_id, ps.paidamt
-        FROM fin_payment_scheduledetail psd, c_orderline ol, c_invoiceline il, fin_payment_schedule ps
-        WHERE ol.c_order_id = p_record_id
+        v_pendingamount := v_grandtotal;
+        --If exist a payment plan for an invoice it will always be an invoice generated completing this order
+        --so we can asume that all fin_payment_scheduledetail records are also related to the order.
+        --With the same asumption if the invoice has some paid amount it will always be by a paymetn for the whole
+        --amount generated on the invoice completion, so we can safely set as paid amount the whole amount of the
+        --payment plan.
+        FOR cur_invoicepayments IN (
+          SELECT distinct psd.fin_payment_scheduledetail_id, ps.paidamt
+          FROM fin_payment_scheduledetail psd, c_orderline ol, c_invoiceline il, fin_payment_schedule ps
+          WHERE ol.c_order_id = p_record_id
           AND ol.c_orderline_id = il.c_orderline_id
           AND il.c_invoice_id = ps.c_invoice_id
           AND psd.fin_payment_schedule_invoice = ps.fin_payment_schedule_id
         ) LOOP
-        UPDATE fin_payment_scheduledetail
-        SET fin_payment_schedule_order = v_payment_schedule_order
-        WHERE fin_payment_scheduledetail_id = cur_invoicepayments.fin_payment_scheduledetail_id;
-        SELECT v_pendingamount -(amount + coalesce(writeoffamt, 0)) INTO v_pendingamount
-        FROM fin_payment_scheduledetail
-        WHERE fin_payment_scheduledetail_id = cur_invoicepayments.fin_payment_scheduledetail_id;
-        UPDATE fin_payment_schedule
-        SET paidamt = paidamt + cur_invoicepayments.paidamt,
-            outstandingamt = outstandingamt - cur_invoicepayments.paidamt
-        WHERE fin_payment_schedule_id = v_payment_schedule_order;
-      END LOOP;
+          UPDATE fin_payment_scheduledetail
+          SET fin_payment_schedule_order = v_payment_schedule_order
+          WHERE fin_payment_scheduledetail_id = cur_invoicepayments.fin_payment_scheduledetail_id;
+          SELECT v_pendingamount -(amount + coalesce(writeoffamt, 0)) INTO v_pendingamount
+          FROM fin_payment_scheduledetail
+          WHERE fin_payment_scheduledetail_id = cur_invoicepayments.fin_payment_scheduledetail_id;
+          UPDATE fin_payment_schedule
+          SET paidamt = paidamt + cur_invoicepayments.paidamt,
+          outstandingamt = outstandingamt - cur_invoicepayments.paidamt
+          WHERE fin_payment_schedule_id = v_payment_schedule_order;
+        END LOOP;
+      END IF;
   
       IF (v_pendingamount <> 0) THEN
         INSERT INTO fin_payment_scheduledetail
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/triggers/APRM_FIN_FINACC_TRAN_CHECK_TRG.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/triggers/APRM_FIN_FINACC_TRAN_CHECK_TRG.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -67,7 +67,7 @@
 							WHERE fin_financial_account_id = :OLD.FIN_FINANCIAL_ACCOUNT_ID
 							AND ((:OLD.TRXTYPE IN ('BPW','BF') AND fin_withdrawal_acct IS NULL)
 							OR (:OLD.TRXTYPE = 'BPD' AND fin_deposit_acct IS NULL));
-			        IF(v_Count>0) THEN
+			        IF(v_Count>0 OR (COALESCE(:OLD.DATEACCT, v_DateNull) <> COALESCE(:NEW.DATEACCT, v_DateNull))) THEN
 			      		RAISE_APPLICATION_ERROR(-20000, '@APRM_RelatedPostedDocument@');
 			        END IF;
 				    ELSIF((COALESCE(:OLD.DATEACCT, v_DateNull) <> COALESCE(:NEW.DATEACCT, v_DateNull))) THEN
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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, to_char('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>
+    <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, to_char('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/model/views/APRM_FINACC_TRX_FULL_ACCT_V.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRX_FULL_ACCT_V.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_FINACC_TRX_FULL_ACCT_V">
-    <view name="APRM_FINACC_TRX_FULL_ACCT_V"><![CDATA[SELECT fact_acct.fact_acct_id AS aprm_finacc_trx_full_acct_v_id, fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.isactive, fact_acct.created, fact_acct.createdby, fact_acct.updated, fact_acct.updatedby, fact_acct.c_acctschema_id, fact_acct.account_id AS c_elementvalue_id, fact_acct.datetrx, fact_acct.dateacct, fact_acct.c_period_id, fact_acct.ad_table_id,  CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN fact_acct.record_id ELSE fact_acct.line_id END AS fin_finacc_transaction_id,  CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE fact_acct.record_id END AS fin_reconciliation_id,  CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE (SELECT fin_bankstatementline.fin_bankstatement_id FROM fin_bankstatementline WHERE fin_bankstatementline.fin_finacc_transaction_id = fact_acct.line_id) END AS fin_bankstatement_id,  CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE (SELECT fin_bankstatementline.line FROM fin_bankstatementline WHERE fin_bankstatementline.fin_finacc_transaction_id = fact_acct.line_id) END AS line, fin_finacc_transaction.fin_financial_account_id, fact_acct.gl_category_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.amtsourcedr, fact_acct.amtsourcecr, fact_acct.amtacctdr, fact_acct.amtacctcr, fact_acct.c_uom_id, fact_acct.qty, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.description, fact_acct.a_asset_id, fact_acct.fact_acct_group_id, fact_acct.seqno, fact_acct.factaccttype, fact_acct.docbasetype, fact_acct.acctvalue, fact_acct.acctdescription, fact_acct.c_withholding_id FROM fact_acct, fin_finacc_transaction WHERE (fact_acct.record_id = fin_finacc_transaction.fin_finacc_transaction_id OR fact_acct.line_id = fin_finacc_transaction.fin_finacc_transaction_id) AND (fact_acct.ad_table_id IN ('4D8C3B3C31D1410DA046140C9F024D17', 'B1B7075C46934F0A9FD4C4D0F1457B42'))]]></view>
+    <view name="APRM_FINACC_TRX_FULL_ACCT_V"><![CDATA[SELECT fact_acct.fact_acct_id AS aprm_finacc_trx_full_acct_v_id, fact_acct.ad_client_id, fact_acct.ad_org_id, fact_acct.isactive, fact_acct.created, fact_acct.createdby, fact_acct.updated, fact_acct.updatedby, fact_acct.c_acctschema_id, fact_acct.account_id AS c_elementvalue_id, fact_acct.datetrx, fact_acct.dateacct, fact_acct.c_period_id, fact_acct.ad_table_id, CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN fact_acct.record_id ELSE fact_acct.line_id END AS fin_finacc_transaction_id, CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE fact_acct.record_id END AS fin_reconciliation_id, CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE (SELECT fin_bankstatementline.fin_bankstatement_id FROM fin_bankstatementline WHERE fin_bankstatementline.fin_finacc_transaction_id = fact_acct.line_id) END AS fin_bankstatement_id, CASE WHEN fact_acct.ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17' THEN NULL ELSE (SELECT fin_bankstatementline.line FROM fin_bankstatementline WHERE fin_bankstatementline.fin_finacc_transaction_id = fact_acct.line_id) END AS line, fin_finacc_transaction.fin_financial_account_id, fact_acct.gl_category_id, fact_acct.c_tax_id, fact_acct.m_locator_id, fact_acct.postingtype, fact_acct.c_currency_id, fact_acct.amtsourcedr, fact_acct.amtsourcecr, fact_acct.amtacctdr, fact_acct.amtacctcr, fact_acct.c_uom_id, fact_acct.qty, fact_acct.m_product_id, fact_acct.c_bpartner_id, fact_acct.ad_orgtrx_id, fact_acct.c_locfrom_id, fact_acct.c_locto_id, fact_acct.c_salesregion_id, fact_acct.c_project_id, fact_acct.c_campaign_id, fact_acct.c_activity_id, fact_acct.user1_id, fact_acct.user2_id, fact_acct.description, fact_acct.a_asset_id, fact_acct.fact_acct_group_id, fact_acct.seqno, fact_acct.factaccttype, fact_acct.docbasetype, fact_acct.acctvalue, fact_acct.acctdescription, fact_acct.c_withholding_id FROM fact_acct, fin_finacc_transaction WHERE (fact_acct.record_id = fin_finacc_transaction.fin_finacc_transaction_id OR fact_acct.line_id = fin_finacc_transaction.fin_finacc_transaction_id) AND (fact_acct.ad_table_id IN ('4D8C3B3C31D1410DA046140C9F024D17', 'B1B7075C46934F0A9FD4C4D0F1457B42'))]]></view>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_PAYMENT_PROP_PICK_EDIT.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_PAYMENT_PROP_PICK_EDIT.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_PAYMENT_PROP_PICK_EDIT">
-    <view name="APRM_PAYMENT_PROP_PICK_EDIT"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS aprm_payment_prop_pick_edit_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.updated, psd.createdby, psd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, o.documentno AS order_documentno, i.documentno AS invoice_documentno, i.poreference AS supplier_reference, COALESCE(i.fin_paymentmethod_id, o.fin_paymentmethod_id) AS fin_paymentmethod_id, COALESCE(i.c_bpartner_id, o.c_bpartner_id) AS c_bpartner_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(psi.expecteddate, pso.expecteddate) AS expecteddate, i.grandtotal AS invoiced, COALESCE(psi.amount, pso.amount) AS expected, psd.amount AS outstanding, COALESCE(ppd.amount, 0) AS payment, COALESCE(psd.amount - ppd.amount, psd.amount) AS difference,  CASE WHEN ppd.writeoffamt <> 0 THEN 'Y' ELSE 'N' END AS writeoff,  CASE WHEN ppd.fin_payment_scheduledetail_id IS NULL THEN 'N' ELSE 'Y' END AS ob_selected, COALESCE(psi.fin_payment_priority_id, pso.fin_payment_priority_id) AS fin_payment_priority_id, COALESCE(i.c_currency_id, o.c_currency_id) AS c_currency_id, COALESCE(i.issotrx, o.issotrx) AS issotrx FROM fin_payment_scheduledetail psd LEFT JOIN fin_payment_prop_detail ppd ON psd.fin_payment_scheduledetail_id = ppd.fin_payment_scheduledetail_id LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id WHERE psd.fin_payment_detail_id IS NULL]]></view>
+    <view name="APRM_PAYMENT_PROP_PICK_EDIT"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS aprm_payment_prop_pick_edit_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.updated, psd.createdby, psd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, o.documentno AS order_documentno, i.documentno AS invoice_documentno, i.poreference AS supplier_reference, COALESCE(i.fin_paymentmethod_id, o.fin_paymentmethod_id) AS fin_paymentmethod_id, COALESCE(i.c_bpartner_id, o.c_bpartner_id) AS c_bpartner_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(psi.expecteddate, pso.expecteddate) AS expecteddate, i.grandtotal AS invoiced, COALESCE(psi.amount, pso.amount) AS expected, psd.amount AS outstanding, COALESCE(ppd.amount, 0) AS payment, COALESCE(psd.amount - ppd.amount, psd.amount) AS difference, CASE WHEN ppd.writeoffamt <> 0 THEN 'Y' ELSE 'N' END AS writeoff, CASE WHEN ppd.fin_payment_scheduledetail_id IS NULL THEN 'N' ELSE 'Y' END AS ob_selected, COALESCE(psi.fin_payment_priority_id, pso.fin_payment_priority_id) AS fin_payment_priority_id, COALESCE(i.c_currency_id, o.c_currency_id) AS c_currency_id, COALESCE(i.issotrx, o.issotrx) AS issotrx FROM fin_payment_scheduledetail psd LEFT JOIN fin_payment_prop_detail ppd ON psd.fin_payment_scheduledetail_id = ppd.fin_payment_scheduledetail_id LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id WHERE psd.fin_payment_detail_id IS NULL]]></view>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_REC_DETAIL_V.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_REC_DETAIL_V.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_REC_DETAIL_V">
-    <view name="APRM_REC_DETAIL_V"><![CDATA[((SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_Reconciled') AS type, fin_finacc_transaction.fin_reconciliation_id, COALESCE(count(*), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.depositamt - fin_finacc_transaction.paymentamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE fin_finacc_transaction.fin_reconciliation_id = fin_reconciliation.fin_reconciliation_id GROUP BY fin_finacc_transaction.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive UNION ALL  SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_UnReconciled') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(count(*), 0) AS item_no, COALESCE(sum(fin_bankstatementline.cramount - fin_bankstatementline.dramount), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_bankstatementline, fin_bankstatement, fin_reconciliation WHERE (fin_bankstatementline.fin_finacc_transaction_id IS NULL OR (EXISTS (SELECT 1 FROM fin_finacc_transaction, fin_reconciliation rec WHERE fin_finacc_transaction.fin_reconciliation_id = rec.fin_reconciliation_id AND fin_bankstatementline.fin_finacc_transaction_id = fin_finacc_transaction.fin_finacc_transaction_id AND fin_finacc_transaction.fin_financial_account_id = fin_bankstatement.fin_financial_account_id AND rec.created > fin_reconciliation.created))) AND fin_bankstatementline.datetrx <= fin_reconciliation.dateto AND fin_bankstatement.fin_bankstatement_id = fin_bankstatementline.fin_bankstatement_id AND fin_bankstatement.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive) UNION ALL  SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_OutstandingPayments') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(sum(CASE COALESCE(fin_finacc_transaction.paymentamt, 0) WHEN 0 THEN 0 ELSE 1 END), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.paymentamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE (fin_finacc_transaction.fin_reconciliation_id IS NULL OR (EXISTS (SELECT 1 FROM fin_reconciliation r WHERE r.dateto > fin_reconciliation.dateto AND fin_finacc_transaction.fin_reconciliation_id = r.fin_reconciliation_id))) AND fin_finacc_transaction.statementdate <= fin_reconciliation.dateto AND fin_finacc_transaction.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive) UNION ALL  SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_OutstandingDeposits') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(sum(CASE COALESCE(fin_finacc_transaction.depositamt, 0) WHEN 0 THEN 0 ELSE 1 END), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.depositamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE (fin_finacc_transaction.fin_reconciliation_id IS NULL OR (EXISTS (SELECT 1 FROM fin_reconciliation r WHERE r.dateto > fin_reconciliation.dateto AND fin_finacc_transaction.fin_reconciliation_id = r.fin_reconciliation_id))) AND fin_finacc_transaction.statementdate <= fin_reconciliation.dateto AND fin_finacc_transaction.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive]]></view>
+    <view name="APRM_REC_DETAIL_V"><![CDATA[((SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_Reconciled') AS type, fin_finacc_transaction.fin_reconciliation_id, COALESCE(count(*), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.depositamt - fin_finacc_transaction.paymentamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE fin_finacc_transaction.fin_reconciliation_id = fin_reconciliation.fin_reconciliation_id GROUP BY fin_finacc_transaction.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive UNION ALL SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_UnReconciled') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(count(*), 0) AS item_no, COALESCE(sum(fin_bankstatementline.cramount - fin_bankstatementline.dramount), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_bankstatementline, fin_bankstatement, fin_reconciliation WHERE (fin_bankstatementline.fin_finacc_transaction_id IS NULL OR (EXISTS (SELECT 1 FROM fin_finacc_transaction, fin_reconciliation rec WHERE fin_finacc_transaction.fin_reconciliation_id = rec.fin_reconciliation_id AND fin_bankstatementline.fin_finacc_transaction_id = fin_finacc_transaction.fin_finacc_transaction_id AND fin_finacc_transaction.fin_financial_account_id = fin_bankstatement.fin_financial_account_id AND rec.created > fin_reconciliation.created))) AND fin_bankstatementline.datetrx <= fin_reconciliation.dateto AND fin_bankstatement.fin_bankstatement_id = fin_bankstatementline.fin_bankstatement_id AND fin_bankstatement.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive) UNION ALL SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_OutstandingPayments') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(sum(CASE COALESCE(fin_finacc_transaction.paymentamt, 0) WHEN 0 THEN 0 ELSE 1 END), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.paymentamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE (fin_finacc_transaction.fin_reconciliation_id IS NULL OR (EXISTS (SELECT 1 FROM fin_reconciliation r WHERE r.dateto > fin_reconciliation.dateto AND fin_finacc_transaction.fin_reconciliation_id = r.fin_reconciliation_id))) AND fin_finacc_transaction.statementdate <= fin_reconciliation.dateto AND fin_finacc_transaction.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive) UNION ALL SELECT get_uuid() AS aprm_rec_detail_v_id, to_char('APRM_OutstandingDeposits') AS type, fin_reconciliation.fin_reconciliation_id, COALESCE(sum(CASE COALESCE(fin_finacc_transaction.depositamt, 0) WHEN 0 THEN 0 ELSE 1 END), 0) AS item_no, COALESCE(sum(fin_finacc_transaction.depositamt), 0) AS item_amt, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive FROM fin_finacc_transaction, fin_reconciliation WHERE (fin_finacc_transaction.fin_reconciliation_id IS NULL OR (EXISTS (SELECT 1 FROM fin_reconciliation r WHERE r.dateto > fin_reconciliation.dateto AND fin_finacc_transaction.fin_reconciliation_id = r.fin_reconciliation_id))) AND fin_finacc_transaction.statementdate <= fin_reconciliation.dateto AND fin_finacc_transaction.fin_financial_account_id = fin_reconciliation.fin_financial_account_id GROUP BY fin_reconciliation.fin_reconciliation_id, fin_reconciliation.ad_client_id, fin_reconciliation.ad_org_id, fin_reconciliation.created, fin_reconciliation.createdby, fin_reconciliation.updated, fin_reconciliation.updatedby, fin_reconciliation.isactive]]></view>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -2578,6 +2578,33 @@
 <!--2C3C6561C2DB4025A367330BB9070FCB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2C3C6561C2DB4025A367330BB9070FCB--></AD_FIELD>
 
+<!--2D22FFF55FDD405DB18F8CC23481333F--><AD_FIELD>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_FIELD_ID><![CDATA[2D22FFF55FDD405DB18F8CC23481333F]]></AD_FIELD_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <NAME><![CDATA[Amount]]></NAME>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_TAB_ID><![CDATA[2ECAED4620B840BA8DD738140F58A629]]></AD_TAB_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_COLUMN_ID><![CDATA[7890366979642CEFE040007F01013334]]></AD_COLUMN_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <GRID_SEQNO><![CDATA[21]]></GRID_SEQNO>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--2D22FFF55FDD405DB18F8CC23481333F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--2D22FFF55FDD405DB18F8CC23481333F--></AD_FIELD>
+
 <!--2D59DEFAF52341F9814A2F071792B57C--><AD_FIELD>
 <!--2D59DEFAF52341F9814A2F071792B57C-->  <AD_FIELD_ID><![CDATA[2D59DEFAF52341F9814A2F071792B57C]]></AD_FIELD_ID>
 <!--2D59DEFAF52341F9814A2F071792B57C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -15949,6 +15976,33 @@
 <!--B8BF3A9E948844DA807DDE25E75A0FFC-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--B8BF3A9E948844DA807DDE25E75A0FFC--></AD_FIELD>
 
+<!--B96C393D0DCF47DFBBA99C2269D30891--><AD_FIELD>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_FIELD_ID><![CDATA[B96C393D0DCF47DFBBA99C2269D30891]]></AD_FIELD_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <NAME><![CDATA[Amount]]></NAME>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_TAB_ID><![CDATA[15ECCF8974044A81982F57F9F1E1A67B]]></AD_TAB_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_COLUMN_ID><![CDATA[7890366979642CEFE040007F01013334]]></AD_COLUMN_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <GRID_SEQNO><![CDATA[31]]></GRID_SEQNO>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--B96C393D0DCF47DFBBA99C2269D30891-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--B96C393D0DCF47DFBBA99C2269D30891--></AD_FIELD>
+
 <!--B9BC67D6F48A46569F7E80607777A270--><AD_FIELD>
 <!--B9BC67D6F48A46569F7E80607777A270-->  <AD_FIELD_ID><![CDATA[B9BC67D6F48A46569F7E80607777A270]]></AD_FIELD_ID>
 <!--B9BC67D6F48A46569F7E80607777A270-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,5 +1,17 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--00D0839059994323B4596EDA7D0BCF56--><AD_MESSAGE>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <AD_MESSAGE_ID><![CDATA[00D0839059994323B4596EDA7D0BCF56]]></AD_MESSAGE_ID>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <VALUE><![CDATA[APRM_PaidInvoice]]></VALUE>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <MSGTEXT><![CDATA[Invoice %s is already fully paid.]]></MSGTEXT>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--00D0839059994323B4596EDA7D0BCF56-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--00D0839059994323B4596EDA7D0BCF56--></AD_MESSAGE>
+
 <!--0267A646C8BD4042AE2422BCB83B4610--><AD_MESSAGE>
 <!--0267A646C8BD4042AE2422BCB83B4610-->  <AD_MESSAGE_ID><![CDATA[0267A646C8BD4042AE2422BCB83B4610]]></AD_MESSAGE_ID>
 <!--0267A646C8BD4042AE2422BCB83B4610-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -649,6 +661,18 @@
 <!--8EF25E4AD4EF46E4BCE4E0FACAFC717F-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--8EF25E4AD4EF46E4BCE4E0FACAFC717F--></AD_MESSAGE>
 
+<!--8FC3C9524EE54E518B679D58F709119D--><AD_MESSAGE>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <AD_MESSAGE_ID><![CDATA[8FC3C9524EE54E518B679D58F709119D]]></AD_MESSAGE_ID>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <VALUE><![CDATA[APRM_AlgorithmConfirm]]></VALUE>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <MSGTEXT><![CDATA[Do you want the algorithm to be run against unmatched bank statement lines?]]></MSGTEXT>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--8FC3C9524EE54E518B679D58F709119D-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--8FC3C9524EE54E518B679D58F709119D--></AD_MESSAGE>
+
 <!--92EC1935A8B947BA83EF82DBD169CA8B--><AD_MESSAGE>
 <!--92EC1935A8B947BA83EF82DBD169CA8B-->  <AD_MESSAGE_ID><![CDATA[92EC1935A8B947BA83EF82DBD169CA8B]]></AD_MESSAGE_ID>
 <!--92EC1935A8B947BA83EF82DBD169CA8B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1165,6 +1189,18 @@
 <!--F579E42461DC472AA4F21B14DD3D680B-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--F579E42461DC472AA4F21B14DD3D680B--></AD_MESSAGE>
 
+<!--FC953B2C0069441DB85EB9BECDF9B7A8--><AD_MESSAGE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_MESSAGE_ID><![CDATA[FC953B2C0069441DB85EB9BECDF9B7A8]]></AD_MESSAGE_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <VALUE><![CDATA[APRM_InvalidOrMissingValues]]></VALUE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <MSGTEXT><![CDATA[Could not load the statement. Please check the file because it could contain invalid values or there are missing values.]]></MSGTEXT>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8--></AD_MESSAGE>
+
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05--><AD_MESSAGE>
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05-->  <AD_MESSAGE_ID><![CDATA[FCDC2F10EAAD46A5A24BCEC2BF017A05]]></AD_MESSAGE_ID>
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.20831]]></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>
@@ -25,7 +25,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <UPDATEINFO><![CDATA[Fixed issue with document sequence numbers reset in case of applying dataset second time.
 Fixed issue 15305.]]></UPDATEINFO>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <REFERENCEDATAINFO><![CDATA[Document types and default algorithm for bank statement auto matching]]></REFERENCEDATAINFO>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A918E3331C404B889D69AA9BFAFB23AC--></AD_MODULE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.20831]]></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_TEXTINTERFACES.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -594,6 +594,17 @@
 <!--4E68CD319FF945578CCF11CF38E0C58C-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--4E68CD319FF945578CCF11CF38E0C58C--></AD_TEXTINTERFACES>
 
+<!--4F3BB58595AA4968BC70A08B60AF3BD9--><AD_TEXTINTERFACES>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <AD_TEXTINTERFACES_ID><![CDATA[4F3BB58595AA4968BC70A08B60AF3BD9]]></AD_TEXTINTERFACES_ID>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <TEXT><![CDATA[Match Type]]></TEXT>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.html]]></FILENAME>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4F3BB58595AA4968BC70A08B60AF3BD9--></AD_TEXTINTERFACES>
+
 <!--549D43D3510845D1965ACD2697B007FA--><AD_TEXTINTERFACES>
 <!--549D43D3510845D1965ACD2697B007FA-->  <AD_TEXTINTERFACES_ID><![CDATA[549D43D3510845D1965ACD2697B007FA]]></AD_TEXTINTERFACES_ID>
 <!--549D43D3510845D1965ACD2697B007FA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -957,6 +968,17 @@
 <!--791A5A770CBA456E9CB8BC43B2495935-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--791A5A770CBA456E9CB8BC43B2495935--></AD_TEXTINTERFACES>
 
+<!--7A0C71B074C448E5B92563BF3C639436--><AD_TEXTINTERFACES>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <AD_TEXTINTERFACES_ID><![CDATA[7A0C71B074C448E5B92563BF3C639436]]></AD_TEXTINTERFACES_ID>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <TEXT><![CDATA[Undo]]></TEXT>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.html]]></FILENAME>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--7A0C71B074C448E5B92563BF3C639436-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--7A0C71B074C448E5B92563BF3C639436--></AD_TEXTINTERFACES>
+
 <!--7A2F80682E4D44568B2BDF1F7D41E935--><AD_TEXTINTERFACES>
 <!--7A2F80682E4D44568B2BDF1F7D41E935-->  <AD_TEXTINTERFACES_ID><![CDATA[7A2F80682E4D44568B2BDF1F7D41E935]]></AD_TEXTINTERFACES_ID>
 <!--7A2F80682E4D44568B2BDF1F7D41E935-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
@@ -409,7 +409,7 @@
     if (account != null) {
       if (!financialAccounts.contains(account)) {
         strFinancialAccountId = financialAccounts.get(0).getId();
-        if (financialAccounts.get(0).getWriteofflimit() != null) {
+        if (financialAccounts.size() > 0 && financialAccounts.get(0).getWriteofflimit() != null) {
           strtypewriteoff = financialAccounts.get(0).getTypewriteoff();
           strAmountwriteoff = financialAccounts.get(0).getWriteofflimit().toString();
           xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
@@ -425,7 +425,7 @@
         }
       }
     } else {
-      if (financialAccounts.get(0).getWriteofflimit() != null) {
+      if (financialAccounts.size() > 0 && financialAccounts.get(0).getWriteofflimit() != null) {
         strtypewriteoff = financialAccounts.get(0).getTypewriteoff();
         strAmountwriteoff = financialAccounts.get(0).getWriteofflimit().toString();
         xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
@@ -594,7 +594,7 @@
 
     JSONObject msg = new JSONObject();
     try {
-      if (financialAccount.getWriteofflimit() != null) {
+      if (financialAccount != null && financialAccount.getWriteofflimit() != null) {
         msg.put("twriteoff", financialAccount.getTypewriteoff());
         msg.put("awriteoff", financialAccount.getWriteofflimit().toString());
       }
@@ -667,8 +667,8 @@
     }
     String processOprtionsComboHtml = null;
 
-    boolean forcedFinancialAccountTransaction = finAccPaymentMethod.isAutomaticDeposit()
-        || finAccPaymentMethod.isAutomaticWithdrawn();
+    boolean forcedFinancialAccountTransaction = isReceipt ? finAccPaymentMethod
+        .isAutomaticDeposit() : finAccPaymentMethod.isAutomaticWithdrawn();
 
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
@@ -62,7 +62,14 @@
     try {
       if (XMLHttpRequestObj.responseText) {
         strText = XMLHttpRequestObj.responseText;
-        var aux = strText.substring(29, strText.length-8);
+        var objson = eval(strText);
+        if(objson.message!==''){
+          showJSMessage(objson.message, null, true, objson.params);
+          return true;
+        }else{
+          showJSMessage(null, null, true);
+        }
+        var aux = objson.grid;
         var tableBody = document.getElementById('sectionGrid');
         var browserName = getBrowserInfo('name');
         if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') !== -1) {
@@ -78,7 +85,6 @@
         } else {
           tableBody.innerHTML = aux;
         }
-        
         updateAll();
         updateTotal();
 
@@ -435,17 +441,17 @@
 function validate(action) {
   var frm = document.frmMain;
   if (action === 'openprocess') {
-	if (isMulticurrencyTxn()) {
-	  if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
-	    setWindowElementFocus(frm.inpActualConverted);
-	    showJSMessage(7);
-	    return false;
-	  } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
-	    setWindowElementFocus(frm.inpExchangeRate);
-	    showJSMessage(7);
-	     return false;
-	  }
-	}
+    if (isMulticurrencyTxn()) {
+      if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
+        setWindowElementFocus(frm.inpActualConverted);
+        showJSMessage(7);
+        return false;
+      } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
+        setWindowElementFocus(frm.inpExchangeRate);
+        showJSMessage(7);
+         return false;
+      }
+    }
     if (frm.inpActualPayment.value === null || frm.inpActualPayment.value === '') {
       setWindowElementFocus(frm.inpActualPayment);
       showJSMessage(7);
@@ -706,12 +712,12 @@
   displayLogicElement('paramActualConvertedCell', display );
   displayLogicElement('lblActualConverted', display );
   if (document.frmMain.strNotAllowExchange.value === 'Y' && display) {  
-	  readOnlyLogicElement('paramExchangeRate', true);
+      readOnlyLogicElement('paramExchangeRate', true);
       readOnlyLogicElement('paramActualConverted', true);
       displayLogicElement('actualConvertedCal', false );
    }
   else {
-	  readOnlyLogicElement('paramExchangeRate', false);
+      readOnlyLogicElement('paramExchangeRate', false);
       readOnlyLogicElement('paramActualConvertedCell', false);
       displayLogicElement('actualConvertedCal', true );
   }
@@ -801,9 +807,6 @@
 }
 </script>
 <script language="JavaScript" type="text/javascript">
-function onloadFunctions() {
-  keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/BusinessPartner.html', 'BPARTNER_SELECTOR', false, 'frmMain', 'inpcBpartnerId', 'inpBpartnerId_DES', document.frmMain.inpBpartnerId_DES.value, 'Command', 'KEY');", "inpBpartnerId_DES", "null");
-}
 function displayLogicForCredit() {
   var hasCredit = compare(document.getElementById('paramCredit').value, '>', '0');
   displayLogicElement('paramCredit', hasCredit );
@@ -836,9 +839,6 @@
   setBrowserAutoComplete(false);
 
   initializeTemplate();
-  try {
-    onloadFunctions();
-  } catch (e) {}
   setGLItemMode(isTrue('isInGLItemMode'));
   displayLogicElement('sectionDifference', false);
   displayLogicElement('sectionDifferenceBox', false);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Wed Aug 07 09:31:14 2013 +0200
@@ -27,6 +27,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Set;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -47,6 +48,7 @@
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.security.OrganizationStructureProvider;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
@@ -63,6 +65,7 @@
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
+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;
@@ -122,9 +125,10 @@
       final String strAmountFrom = vars.getNumericParameter("inpAmountFrom", "");
       final String strAmountTo = vars.getNumericParameter("inpAmountTo", "");
 
-      printGrid(response, vars, strFinancialAccountId, strBusinessPartnerId, strExpectedDateFrom,
-          strExpectedDateTo, strTransDateFrom, strTransDateTo, strDocumentType, strDocumentNo,
-          strSelectedPaymentDetails, isReceipt, strCurrencyId, strAmountFrom, strAmountTo);
+      printGrid(response, request, vars, strFinancialAccountId, strBusinessPartnerId,
+          strExpectedDateFrom, strExpectedDateTo, strTransDateFrom, strTransDateTo,
+          strDocumentType, strDocumentNo, strSelectedPaymentDetails, isReceipt, strCurrencyId,
+          strAmountFrom, strAmountTo);
 
     } else if (vars.commandIn("PAYMENTMETHODCOMBO")) {
       final String strBusinessPartnerId = vars.getRequestGlobalVariable("inpcBpartnerId", "");
@@ -398,8 +402,6 @@
       final PrintWriter out = response.getWriter();
       out.println(xmlDocument.print());
       out.close();
-
-      // "../org.openbravo.advpaymentmngt.ad_actionbutton/AddTransaction.html");
     }
 
   }
@@ -630,15 +632,15 @@
     out.close();
   }
 
-  private void printGrid(HttpServletResponse response, VariablesSecureApp vars,
-      String strFinancialAccountId, String strBusinessPartnerId, String strExpectedDateFrom,
-      String strExpectedDateTo, String strTransDateFrom, String strTransDateTo,
-      String strDocumentType, String strDocumentNo, String strSelectedPaymentDetails,
-      boolean isReceipt, String strCurrencyId, String strAmountFrom, String strAmountTo)
-      throws IOException, ServletException {
+  private void printGrid(HttpServletResponse response, HttpServletRequest request,
+      VariablesSecureApp vars, String strFinancialAccountId, String strBusinessPartnerId,
+      String strExpectedDateFrom, String strExpectedDateTo, String strTransDateFrom,
+      String strTransDateTo, String strDocumentType, String strDocumentNo,
+      String strSelectedPaymentDetails, boolean isReceipt, String strCurrencyId,
+      String strAmountFrom, String strAmountTo) throws IOException, ServletException {
 
     log4j.debug("Output: Grid with pending payments");
-
+    String message = "";
     dao = new AdvPaymentMngtDao();
     FIN_FinancialAccount financialAccount = dao.getObject(FIN_FinancialAccount.class,
         strFinancialAccountId);
@@ -681,12 +683,45 @@
     final FieldProvider[] data = FIN_AddPayment.getShownScheduledPaymentDetails(vars,
         selectedScheduledPaymentDetails, filteredScheduledPaymentDetails, false, null, null,
         displayDoubtfulDebtAmount(isReceipt));
+    String invoiceIdentifier = "";
+    if ((data == null || data.length == 0) && !"".equals(strDocumentNo) && strDocumentNo != null) {
+      final OBCriteria<Invoice> obc = OBDal.getInstance().createCriteria(Invoice.class);
+      if (isReceipt) {
+        obc.add(Restrictions.eq(Invoice.PROPERTY_DOCUMENTNO, strDocumentNo));
+      } else {
+        obc.add(Restrictions.eq(Invoice.PROPERTY_ORDERREFERENCE, strDocumentNo));
+      }
+      obc.add(Restrictions.eq(Invoice.PROPERTY_PROCESSED, true));
+      obc.add(Restrictions.eq(Invoice.PROPERTY_SALESTRANSACTION, isReceipt));
+      if (strBusinessPartnerId != null && !"".equals(strBusinessPartnerId)) {
+        obc.add(Restrictions.eq(Invoice.PROPERTY_BUSINESSPARTNER, strBusinessPartnerId));
+      }
+      obc.add(Restrictions.eq(Invoice.PROPERTY_PAYMENTCOMPLETE, true));
+      obc.add(Restrictions.in(Invoice.PROPERTY_ORGANIZATION,
+          getOrganizationList(new OrganizationStructureProvider().getChildTree(financialAccount
+              .getOrganization().getId(), true))));
+      obc.addOrderBy(Invoice.PROPERTY_INVOICEDATE, false);
+      Invoice invoice = (Invoice) obc.uniqueResult();
+      if (invoice != null) {
+        invoiceIdentifier = invoice.getIdentifier();
+        message = "APRM_PaidInvoice";
+      }
+    }
     xmlDocument.setData("structure", (data == null) ? set() : data);
-
-    response.setContentType("text/html; charset=UTF-8");
-    PrintWriter out = response.getWriter();
-    out.println(xmlDocument.print());
-    out.close();
+    try {
+      JSONObject json = new JSONObject();
+      ArrayList<String> params = new ArrayList<String>();
+      params.add(invoiceIdentifier);
+      json.put("message", message);
+      json.put("params", params);
+      json.put("grid", xmlDocument.print());
+      response.setContentType("text/html; charset=UTF-8");
+      PrintWriter out = response.getWriter();
+      out.println("objson = " + json);
+      out.close();
+    } catch (JSONException e) {
+      log4j.error("AddPaymentFromTransaction - CallbackGrid", e);
+    }
   }
 
   /**
@@ -854,22 +889,34 @@
     // end of getServletInfo() method
   }
 
+  private List<Organization> getOrganizationList(Set<String> orgIds) {
+    List<Organization> result = new ArrayList<Organization>();
+    for (String orgId : orgIds) {
+      result.add(OBDal.getInstance().get(Organization.class, orgId));
+    }
+    return result;
+  }
+
   boolean displayDoubtfulDebtAmount(boolean isReceipt) {
     if (!isReceipt) {
       return false;
     }
-    OBCriteria<Preference> obCriteria = OBDal.getInstance().createCriteria(Preference.class);
-    obCriteria.add(Restrictions.eq(Preference.PROPERTY_ATTRIBUTE, "Doubtful_Debt_Visibility"));
-    obCriteria.add(Restrictions.eq(Preference.PROPERTY_CLIENT, OBContext.getOBContext()
-        .getCurrentClient()));
-    obCriteria.add(Restrictions.in(Preference.PROPERTY_ORGANIZATION + ".id", OBContext
-        .getOBContext().getReadableOrganizations()));
-    Preference preference = (Preference) obCriteria.uniqueResult();
-    if (preference != null) {
-      return "Y".equals(preference.getSearchKey());
-    } else {
-      return false;
+    OBContext.setAdminMode();
+    try {
+      OBCriteria<Preference> obCriteria = OBDal.getInstance().createCriteria(Preference.class);
+      obCriteria.add(Restrictions.eq(Preference.PROPERTY_ATTRIBUTE, "Doubtful_Debt_Visibility"));
+      obCriteria.add(Restrictions.eq(Preference.PROPERTY_CLIENT, OBContext.getOBContext()
+          .getCurrentClient()));
+      obCriteria.add(Restrictions.in(Preference.PROPERTY_ORGANIZATION + ".id", OBContext
+          .getOBContext().getReadableOrganizations()));
+      Preference preference = (Preference) obCriteria.uniqueResult();
+      if (preference != null) {
+        return "Y".equals(preference.getSearchKey());
+      } else {
+        return false;
+      }
+    } finally {
+      OBContext.restorePreviousMode();
     }
-
   }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -1060,9 +1060,7 @@
               <td class="TitleCell"><span class="LabelText">Document</span></td>
               <td class="Combo_ContentCell">
                 <select  name="inpDocumentType" id="paramDocumentType" class="Combo Combo_OneCell_width" onchange="showPaymentSection2();return true;">
-                  <!-- <option value=""><div id="reportDocument"></div></option> -->
-                  <option value="RCIN" selected="selected">Received In</option>
-                  <option value="PDOUT">Paid Out</option>
+                  <option value=""><div id="reportDocumentType"></div></option>
                 </select>
               </td> 
               <td class="TitleCell"><span class="LabelText">From Date</span></td>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -150,29 +150,34 @@
 
       String strTransactionDate = vars.getStringParameter("inpMainDate", "");
       String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "AddTransaction|Org");
-      final Organization org = OBDal.getInstance().get(Organization.class, strOrgId);
-      String strclient = org.getClient().getId();
-      boolean orgLegalWithAccounting = false;
-      if ((org.getOrganizationType().isLegalEntity())
-          || (org.getOrganizationType().isBusinessUnit())) {
-        orgLegalWithAccounting = true;
-      }
-      if ((!FIN_Utility.isPeriodOpen(strclient, AcctServer.DOCTYPE_FinAccTransaction, strOrgId,
-          strTransactionDate)) && orgLegalWithAccounting) {
-        try {
-          JSONObject json = new JSONObject();
-          json.put("text", "PeriodNotAvailable");
+      OBContext.setAdminMode();
+      try {
+        final Organization org = OBDal.getInstance().get(Organization.class, strOrgId);
+        String strclient = org.getClient().getId();
+        boolean orgLegalWithAccounting = false;
+        if ((org.getOrganizationType().isLegalEntity())
+            || (org.getOrganizationType().isBusinessUnit())) {
+          orgLegalWithAccounting = true;
+        }
+        if ((!FIN_Utility.isPeriodOpen(strclient, AcctServer.DOCTYPE_FinAccTransaction, strOrgId,
+            strTransactionDate)) && orgLegalWithAccounting) {
+          try {
+            JSONObject json = new JSONObject();
+            json.put("text", "PeriodNotAvailable");
 
-          response.setContentType("text/html; charset=UTF-8");
-          PrintWriter out = response.getWriter();
-          out.println("objson = " + json);
-          out.close();
+            response.setContentType("text/html; charset=UTF-8");
+            PrintWriter out = response.getWriter();
+            out.println("objson = " + json);
+            out.close();
 
-        } catch (JSONException e) {
+          } catch (JSONException e) {
 
-          e.printStackTrace();
+            e.printStackTrace();
+          }
+
         }
-
+      } finally {
+        OBContext.restorePreviousMode();
       }
     }
 
@@ -363,21 +368,45 @@
     xmlDocument.setParameter("finFinancialAccountId", strFinancialAccountId);
     xmlDocument.setParameter("finBankStatementLineId", strBankStatementLineId);
     String transactionType = "P";
+    try {
+      String Document_Type_AddTransaction_Reference_ID = "40B84CF78FC9435790887846CCDAE875";
+      ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
+          Document_Type_AddTransaction_Reference_ID, "", Utility.getContext(this, vars,
+              "#AccessibleOrgTree", "AddTransaction"), Utility.getContext(this, vars,
+              "#User_Client", "AddTransaction"), 0);
+      Utility.fillSQLParameters(this, vars, null, comboTableData, "AddTransaction", "");
+      xmlDocument.setData("reportDocumentType", "liststructure", comboTableData.select(false));
+      comboTableData = null;
+    } catch (Exception ex) {
+      throw new ServletException(ex);
+    }
+    boolean isReceipt = true;
     if (!"".equals(strBankStatementLineId)) {
       FIN_BankStatementLine bsl = OBDal.getInstance().get(FIN_BankStatementLine.class,
           strBankStatementLineId);
       String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
           .getProperty("dateFormat.java");
       SimpleDateFormat dateFormater = new SimpleDateFormat(dateFormat);
-
+      // Default signum based on amount
+      isReceipt = bsl.getCramount().subtract(bsl.getDramount()).signum() > 0;
+      if (bsl.getBusinessPartner() != null && bsl.getBusinessPartner().isCustomer()
+          && !bsl.getBusinessPartner().isVendor()) {
+        isReceipt = true;
+      }
+      if (bsl.getBusinessPartner() != null && !bsl.getBusinessPartner().isCustomer()
+          && bsl.getBusinessPartner().isVendor()) {
+        isReceipt = false;
+      }
       xmlDocument.setParameter("depositAmount", bsl.getCramount().toString());
       xmlDocument.setParameter("paymentAmount", bsl.getDramount().toString());
       xmlDocument.setParameter("depositAmountGLItem", bsl.getCramount().toString());
       xmlDocument.setParameter("paymentAmountGLItem", bsl.getDramount().toString());
       xmlDocument.setParameter("mainDate", dateFormater.format(bsl.getTransactionDate()));
-      String bslDescription = !"".equals(bsl) ? bsl.getDescription() : "";
-      String strDescription = !"".equals(bsl.getBpartnername()) ? bsl.getBpartnername() + "\n"
-          + bslDescription : bslDescription;
+      String bslDescription = (!"".equals(bsl.getDescription()) && bsl.getDescription() != null) ? bsl
+          .getDescription() : "";
+      String strDescription = (!"".equals(bsl.getBpartnername()) && bsl.getBpartnername() != null) ? bsl
+          .getBpartnername() + "\n" + bslDescription
+          : bslDescription;
       xmlDocument.setParameter("GLItemDescription", strDescription);
       xmlDocument.setParameter("FeeDescription", strDescription);
       if (bsl.getGLItem() != null) {
@@ -398,6 +427,9 @@
       xmlDocument.setParameter("FeeDescription", "");
 
     }
+    final String RECEIVED_IN_OPTION = "RCIN";
+    final String PAID_OUT_OPTION = "PDOUT";
+    xmlDocument.setParameter("documentType", isReceipt ? RECEIVED_IN_OPTION : PAID_OUT_OPTION);
     try {
       String Transaction_Type_AddTransaction_Reference_ID = "C1B4345A1F8841C2B1ADD403CA733D75";
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
@@ -489,12 +521,17 @@
     // Payments not deposited/withdrawal
     // Not stored in Fin_Finacc_Transaction table
     final FieldProvider[] data;
-    if (showAlternativeFA & isReceipt) {
-      data = dao.getAlternativePaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
-          FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+    if (!"Y".equals(closeAutomatically)) {
+      if (showAlternativeFA & isReceipt) {
+        data = dao.getAlternativePaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
+            FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+      } else {
+        data = dao.getPaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
+            FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+      }
     } else {
-      data = dao.getPaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
-          FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+      vars.setSessionValue("MatchTransaction.executeMatching", "N");
+      data = null;
     }
     xmlDocument.setData("structure", (data == null) ? set() : data);
     JSONObject table = new JSONObject();
@@ -532,6 +569,7 @@
     if (bsline.getCramount().compareTo(finTrans.getDepositAmount()) != 0
         || bsline.getDramount().compareTo(finTrans.getPaymentAmount()) != 0) {
       vars.setSessionValue("AddTransaction|ShowJSMessage", "Y");
+      vars.setSessionValue("AddTransaction|SelectedTransaction", finTrans.getId());
     } else {
       FIN_Reconciliation reconciliation = TransactionsDao.getLastReconciliation(
           finTrans.getAccount(), "N");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -64,8 +64,10 @@
   
     
     <!-- Document Type -->
-    <PARAMETER id="paramDocument" name="document"/>
-    
+    <PARAMETER id="paramDocumentType" name="documentType"/>
+      <SUBREPORT id="reportDocumentType" name="reportDocumentType" report="org/openbravo/erpCommon/reference/List">
+        <ARGUMENT name="parameterListSelected" withId="paramDocumentType"/>
+      </SUBREPORT>
     <!-- Transaction Type -->
     <PARAMETER id="paramTransactionType" name="transactionType"/>
       <SUBREPORT id="reportTransactionType" name="reportTransactionType" report="org/openbravo/erpCommon/reference/List">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.html	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.html	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -80,8 +80,11 @@
   document.getElementById("inpReferenceNo_" + sc_FIN_FinAcc_Transaction_ID.bslId).innerHTML = selected["finPayment" + OB.Constants.FIELDSEPARATOR + "referenceNo"]==undefined?'':selected["finPayment" + OB.Constants.FIELDSEPARATOR + "referenceNo"];
   document.getElementById("inpAmount_" + sc_FIN_FinAcc_Transaction_ID.bslId).innerHTML = subtract(depositAmt, paymentAmt);
   document.getElementById("inpMatchingType_" + sc_FIN_FinAcc_Transaction_ID.bslId).value = "MA";
+  document.getElementById("inpMatchType_" + sc_FIN_FinAcc_Transaction_ID.bslId).innerHTML = "Manual";
   document.getElementById("inpCheckBox_" + sc_FIN_FinAcc_Transaction_ID.bslId).checked = true;
   document.getElementById("inpCheckBox_" + sc_FIN_FinAcc_Transaction_ID.bslId).disabled = false;
+  document.frmMain.inpFinBankStatementLineId.value = sc_FIN_FinAcc_Transaction_ID.bslId;
+  sendActionToServer("MATCH");
 }
 
 function openSelector(bslId) {
@@ -127,8 +130,9 @@
 function unMatchLine(bankStatementLineId, isChecked) {
   if (!isChecked) {
     disableChecks();
+    document.frmMain.inpFinBankStatementLineId.value = bankStatementLineId;
     APRMMatchStatementIds[bankStatementLineId]=false;
-    document.frmMain.inpFinBankStatementLineId.value = bankStatementLineId;
+    sendActionToServer("UNMATCH");
     document.getElementById("inpMatchedDocument_" + bankStatementLineId).innerHTML = "";
     document.getElementById("inpTransactionDate_" + bankStatementLineId).innerHTML = "";
     document.getElementById("inpBPartner_" + bankStatementLineId).innerHTML = "";
@@ -137,11 +141,13 @@
     document.getElementById("inpFinancialTransactionId_" + bankStatementLineId).value = "";
     document.getElementById("inpMatchStyle_" + bankStatementLineId).style.backgroundColor = "white";
     document.getElementById("inpMatchingType_" + bankStatementLineId).value = "";
+    document.getElementById("inpMatchType_" + bankStatementLineId).innerHTML = "";
     document.getElementById("inpExecuteMatching").value = "N";
-    sendActionToServer("UNMATCH");
   }
   else {
     APRMMatchStatementIds[bankStatementLineId]=true;
+    document.frmMain.inpFinBankStatementLineId.value = bankStatementLineId;
+    sendActionToServer("MATCH");
   }
   return true;
 }
@@ -172,12 +178,15 @@
 }
 </script>
 <script language="JavaScript" type="text/javascript">
-    function loadGrid() {
+    function loadGrid(skipMatching) {
       try {
         var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/MatchTransaction.html";
         var paramXMLReq = null;
         serverWorking = true;
         document.frmMain.buttonProcess.disabled = true;
+        if(skipMatching){
+         document.getElementById("inpExecuteMatching").value = "N";
+        }
         return submitXmlHttpRequest(callBackGrid, document.frmMain, "GRID", url, false, null, paramXMLReq);
       } catch (e) {
         alert(e);
@@ -215,7 +224,12 @@
               document.frmMain.isFirstLoad.value="false";
             }
             if (showJSMessage === "Y") {
-              displayMessageBox('APRM_TransactionLinesAmountNotMatch');
+              if (confirm(document.frmMain.inpTrlSplitConfirmText.value)) {
+                document.frmMain.inpSelectedFindTransactionId.value = selected.id;
+                splitRow();
+              } else {
+                showJSMessage('APRM_LinesAmountMismatch');
+              }
             }else{
               initialize_MessageBox('messageBoxID');
             }
@@ -329,7 +343,11 @@
     try {
       onloadFunctions();
     } catch (e) {}
-    loadGrid();
+    if(confirm(document.getElementById("paramConfirmationMessage").value)){
+      loadGrid();   
+    }else{
+      loadGrid(true);
+    }
     resizeAreaCreateFrom();
   }
   function validate(action) {
@@ -346,6 +364,7 @@
   <input type="hidden" name="Command" />
   <input type="hidden" name="IsPopUpCall" value="1" />
   <input type="hidden" name="paraMatchedAgainstTransaction" value="xxTransaction" id="paraMatchedAgainstTransaction"/>
+  <input type="hidden" name="paramConfirmationMessage" value="xxMessage" id="paramConfirmationMessage"/>
   <input type="hidden" name="inpadOrgId" value="" id="fieldOrg"/>
   <input type="hidden" name="inpwindowId" value="MBS" id="fieldWindowId"/>
   <input type="hidden" name="inpTabId" value="" id="fieldTabId"/>
@@ -572,14 +591,14 @@
                   <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                     <thead>
                       <tr>
-                        <td colspan="5" style="text-align: center; font-weight: bold;">Imported Bank Statement Lines</td>
+                        <td colspan="6" style="text-align: center; font-weight: bold;">Imported Bank Statement Lines</td>
                         <td style="text-align: center;"></td>
-                        <td colspan="5" style="text-align: center; font-weight: bold;">Transactions in Openbravo</td>
+                        <td colspan="6" style="text-align: center; font-weight: bold;">Transactions in Openbravo</td>
                       </tr>
                       <tr style="border-top: thin solid gray;">
-                        <td colspan="5" style="border-right: thin solid gray;"><span class="LabelText">Show</span>&nbsp;<span><select name="inpPaymentTypeFilter" class="ComboKey Combo_TwoCells_width required" id="inpPaymentTypeFilter" onchange="loadGrid(); return true;"><option value="" class="discard">Deposits and payments</option></select></span>&nbsp;<nobr><span class="LabelText">Cleared</span>&nbsp;<span><input type="checkbox" name="inpShowCleared" id="inpShowCleared" disabled=true value="Y" onclick="loadGrid(); return true;" /></span></nobr></td>
+                        <td colspan="6" style="border-right: thin solid gray;"><span class="LabelText">Show</span>&nbsp;<span><select name="inpPaymentTypeFilter" class="ComboKey Combo_TwoCells_width required" id="inpPaymentTypeFilter" onchange="loadGrid(true); return true;"><option value="" class="discard">Deposits and payments</option></select></span>&nbsp;<nobr><span class="LabelText">Cleared</span>&nbsp;<span><input type="checkbox" name="inpShowCleared" id="inpShowCleared" disabled=true value="Y" onclick="loadGrid(true); return true;" /></span></nobr></td>
                         <td style="text-align: center;"></td>
-                        <td colspan="5" style="border-left: thin solid gray;"></span>&nbsp;&nbsp;<span>Hide transactions after statement date</span>&nbsp;&nbsp;<span><input type="checkbox" name="inphideDate" id="fieldhideDate" disabled=true value="Y" onClick="loadGrid(); return true;"/></span>&nbsp;&nbsp;<span>Ending Date</span>&nbsp;&nbsp;<span type="LabelText" id="paramDateTo"></span></td>
+                        <td colspan="6" style="border-left: thin solid gray;"></span>&nbsp;&nbsp;<span>Hide transactions after statement date</span>&nbsp;&nbsp;<span><input type="checkbox" name="inphideDate" id="fieldhideDate" disabled=true value="Y" onClick="loadGrid(); return true;"/></span>&nbsp;&nbsp;<span>Ending Date</span>&nbsp;&nbsp;<span type="LabelText" id="paramDateTo"></span></td>
                       </tr>
                       <tr class="DataGrid_Body_Row">
                         <th class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox" width="25">
@@ -590,6 +609,7 @@
                         <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Amount</th>
                         <th class="DataGrid_Header_Cell" style="text-align: center;" width="100">Match</th>
                         <th class="DataGrid_Header_Cell" width="70">Matched Document</th>
+                        <th class="DataGrid_Header_Cell" width="70">Match Type</th>
                         <th class="DataGrid_Header_Cell" width="70">Date</th>
                         <th class="DataGrid_Header_Cell" width="100">Bus. Partner</th>
                         <th class="DataGrid_Header_Cell" width="100">Reference</th>
@@ -629,19 +649,19 @@
                     id="buttonProcess"
                     class="ButtonLink"
                     onclick="submitThisPage('SAVE');return false;"
-                    onfocus="buttonEvent('onfocus', this); window.status='Save'; return true;"
+                    onfocus="buttonEvent('onfocus', this); window.status='OK'; return true;"
                     onblur="buttonEvent('onblur', this);"
                     onkeyup="buttonEvent('onkeyup', this);"
                     onkeydown="buttonEvent('onkeydown', this);"
                     onkeypress="buttonEvent('onkeypress', this);"
                     onmouseup="buttonEvent('onmouseup', this);"
                     onmousedown="buttonEvent('onmousedown', this);"
-                    onmouseover="buttonEvent('onmouseover', this); window.status='Save'; return true;"
+                    onmouseover="buttonEvent('onmouseover', this); window.status='OK'; return true;"
                     onmouseout="buttonEvent('onmouseout', this);">
                     <table class="Button">
                       <tr>
-                        <td class="Button_left"><img class="Button_Icon Button_Icon_save" alt="Save" title="Save" src="../../../../../web/images/blank.gif" border="0" /></td>
-                        <td class="Button_text Button_width">Save</td>
+                        <td class="Button_left"><img class="Button_Icon Button_Icon_save" alt="OK" title="OK" src="../../../../../web/images/blank.gif" border="0" /></td>
+                        <td class="Button_text Button_width">OK</td>
                         <td class="Button_right"></td>
                       </tr>
                     </table>
@@ -679,19 +699,19 @@
                     id="buttonCancel"
                     class="ButtonLink"
                     onclick="submitThisPage('CANCEL');return false;"
-                    onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;"
+                    onfocus="buttonEvent('onfocus', this); window.status='Undo'; return true;"
                     onblur="buttonEvent('onblur', this);"
                     onkeyup="buttonEvent('onkeyup', this);"
                     onkeydown="buttonEvent('onkeydown', this);"
                     onkeypress="buttonEvent('onkeypress', this);"
                     onmouseup="buttonEvent('onmouseup', this);"
                     onmousedown="buttonEvent('onmousedown', this);"
-                    onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;"
+                    onmouseover="buttonEvent('onmouseover', this); window.status='Undo'; return true;"
                     onmouseout="buttonEvent('onmouseout', this);">
                     <table class="Button">
                       <tr>
-                        <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Cancel" title="Cancel" src="../../../../../web/images/blank.gif" border="0" /></td>
-                        <td class="Button_text Button_width">Cancel</td>
+                        <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Undo" title="Undo" src="../../../../../web/images/blank.gif" border="0" /></td>
+                        <td class="Button_text Button_width">Undo</td>
                         <td class="Button_right"></td>
                       </tr>
                     </table>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -46,7 +46,6 @@
 import org.openbravo.advpaymentmngt.utility.FIN_MatchingTransaction;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -61,6 +60,8 @@
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.model.ad.domain.ListTrl;
+import org.openbravo.model.ad.domain.Reference;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
@@ -83,220 +84,204 @@
 public class MatchTransaction extends HttpSecureAppServlet {
   private static final long serialVersionUID = 1L;
   VariablesSecureApp vars = null;
+  static ArrayList<String> runingReconciliations = new ArrayList<String>();
 
   public void doPost(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
+    // long init = System.currentTimeMillis();
     vars = new VariablesSecureApp(request);
-
-    if (vars.commandIn("DEFAULT")) {
-      String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "MatchTransaction.adOrgId");
-      String strWindowId = vars.getGlobalVariable("inpwindowId", "MatchTransaction.adWindowId");
-      String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
-      String strFinancialAccountId = vars.getGlobalVariable("inpfinFinancialAccountId",
-          "MatchTransaction.finFinancialAccountId");
-      String strPaymentTypeFilter = vars.getGlobalVariable("inpPaymentTypeFilter",
-          "MatchTransaction.paymentTypeFilter", "ALL");
-      String strShowCleared = vars.getGlobalVariable("inpShowCleared",
-          "MatchTransaction.showCleared", "N");
-      String strHideDate = vars.getGlobalVariable("inpHideDate", "MatchTransaction.hideDate", "Y");
-      FIN_FinancialAccount account = OBDal.getInstance().get(FIN_FinancialAccount.class,
-          strFinancialAccountId);
-      FIN_Reconciliation reconciliation = TransactionsDao.getLastReconciliation(OBDal.getInstance()
-          .get(FIN_FinancialAccount.class, strFinancialAccountId), "N");
-      int reconciledItems = 0;
-      if (reconciliation != null) {
-        if (isManualReconciliation(reconciliation)) {
-          OBDal.getInstance().rollbackAndClose();
+    String strReconciliationId = "";
+    try {
+      if (vars.commandIn("DEFAULT")) {
+        String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "MatchTransaction.adOrgId");
+        String strWindowId = vars.getGlobalVariable("inpwindowId", "MatchTransaction.adWindowId");
+        String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
+        String strFinancialAccountId = vars.getGlobalVariable("inpfinFinancialAccountId",
+            "MatchTransaction.finFinancialAccountId");
+        String strPaymentTypeFilter = vars.getGlobalVariable("inpPaymentTypeFilter",
+            "MatchTransaction.paymentTypeFilter", "ALL");
+        String strShowCleared = vars.getGlobalVariable("inpShowCleared",
+            "MatchTransaction.showCleared", "N");
+        String strHideDate = vars
+            .getGlobalVariable("inpHideDate", "MatchTransaction.hideDate", "Y");
+        FIN_FinancialAccount account = OBDal.getInstance().get(FIN_FinancialAccount.class,
+            strFinancialAccountId);
+        FIN_Reconciliation reconciliation = TransactionsDao.getLastReconciliation(OBDal
+            .getInstance().get(FIN_FinancialAccount.class, strFinancialAccountId), "N");
+        int reconciledItems = 0;
+        if (reconciliation != null) {
+          strReconciliationId = reconciliation.getId();
+          if (runingReconciliations.contains(strReconciliationId)) {
+            wait(strReconciliationId);
+          }
+          runingReconciliations.add(reconciliation.getId());
+          if (isManualReconciliation(reconciliation)) {
+            OBDal.getInstance().rollbackAndClose();
+            OBError message = Utility.translateError(this, vars, vars.getLanguage(), Utility
+                .parseTranslation(this, vars, vars.getLanguage(), "@APRM_ReconciliationMixed@"));
+            vars.setMessage(strTabId, message);
+            printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
+            return;
+          }
+          OBContext.setAdminMode();
+          try {
+            getSnapShot(reconciliation);
+            reconciledItems = reconciliation.getFINReconciliationLineVList().size();
+          } finally {
+            OBContext.restorePreviousMode();
+          }
+        }
+        if (MatchTransactionDao.getUnMatchedBankStatementLines(account).size() == 0
+            && reconciledItems == 0) {
           OBError message = Utility.translateError(this, vars, vars.getLanguage(), Utility
-              .parseTranslation(this, vars, vars.getLanguage(), "@APRM_ReconciliationMixed@"));
+              .parseTranslation(this, vars, vars.getLanguage(), "@APRM_NoStatementsToMatch@"));
           vars.setMessage(strTabId, message);
           printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
-          return;
+        } else {
+          if (reconciliation == null) {
+            reconciliation = MatchTransactionDao.addNewReconciliation(this, vars,
+                strFinancialAccountId);
+            strReconciliationId = reconciliation.getId();
+            if (runingReconciliations.contains(strReconciliationId)) {
+              wait(strReconciliationId);
+            }
+            runingReconciliations.add(strReconciliationId);
+            getSnapShot(reconciliation);
+          } else {
+            updateReconciliation(reconciliation.getId(), strFinancialAccountId, strTabId, false);
+          }
+          printPage(response, vars, strOrgId, strWindowId, strTabId, strPaymentTypeFilter,
+              strFinancialAccountId, reconciliation.getId(), strShowCleared, strHideDate);
         }
+        // log4j.error("Default took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("GRID")) {
+        String strFinancialAccountId = vars.getRequestGlobalVariable("inpfinFinancialAccountId",
+            "MatchTransaction.finFinancialAccountId");
+        strReconciliationId = vars.getRequestGlobalVariable("inpfinReconciliationId",
+            "MatchTransaction.finReconciliationId");
+        if (runingReconciliations.contains(strReconciliationId)) {
+          wait(strReconciliationId);
+        }
+        runingReconciliations.add(strReconciliationId);
+        String strPaymentTypeFilter = vars.getRequestGlobalVariable("inpPaymentTypeFilter",
+            "MatchTransaction.paymentTypeFilter");
+        String strShowCleared = vars.getRequestGlobalVariable("inpShowCleared",
+            "MatchTransaction.showCleared");
+        String executeMatching = vars.getSessionValue("MatchTransaction.executeMatching");
+        vars.setSessionValue("MatchTransaction.executeMatching", "");
+        if (executeMatching.equals("")) {
+          executeMatching = vars.getStringParameter("inpExecuteMatching", "Y");
+        }
+        if (strShowCleared.equals("")) {
+          strShowCleared = "N";
+          vars.setSessionValue("MatchTransaction.showCleared", strShowCleared);
+        }
+        String strHideDate = vars.getRequestGlobalVariable("inphideDate",
+            "MatchTransaction.hideDate");
+        if (strHideDate.equals("")) {
+          strHideDate = "N";
+          vars.setSessionValue("MatchTransaction.hideDate", strHideDate);
+        }
+        String showJSMessage = vars.getSessionValue("AddTransaction|ShowJSMessage");
+        vars.setSessionValue("AddTransaction|ShowJSMessage", "N");
+
+        printGrid(response, vars, strPaymentTypeFilter, strFinancialAccountId, strReconciliationId,
+            strShowCleared, strHideDate, showJSMessage, "Y".equals(executeMatching));
+        // log4j.error("PrintGrid took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("UNMATCH")) {
+        strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
+        if (runingReconciliations.contains(strReconciliationId)) {
+          wait(strReconciliationId);
+        }
+        runingReconciliations.add(strReconciliationId);
+        String strUnmatchBankStatementLineId = vars
+            .getRequiredStringParameter("inpFinBankStatementLineId");
+        unMatchBankStatementLine(response, strUnmatchBankStatementLineId);
+        // log4j.error("UnMatch took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("MATCH")) {
+        strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
+        if (runingReconciliations.contains(strReconciliationId)) {
+          wait(strReconciliationId);
+        }
+        runingReconciliations.add(strReconciliationId);
+        String strMatchedBankStatementLineId = vars
+            .getRequiredStringParameter("inpFinBankStatementLineId");
+        String strFinancialTransactionId = vars
+            .getRequiredStringParameter("inpFinancialTransactionId_"
+                + strMatchedBankStatementLineId);
+        matchBankStatementLine(strMatchedBankStatementLineId, strFinancialTransactionId,
+            strReconciliationId, null);
+        response.setContentType("text/html; charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        out.println("data = " + new JSONObject().toString());
+        out.close();
+        // log4j.error("Match took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("CANCEL")) {
+        strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
+        if (runingReconciliations.contains(strReconciliationId)) {
+          wait(strReconciliationId);
+        }
+        runingReconciliations.add(strReconciliationId);
+        restoreSnapShot(OBDal.getInstance().get(FIN_Reconciliation.class, strReconciliationId));
+        String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
+        String strWindowPath = Utility.getTabURL(strTabId, "R", true);
+        if (strWindowPath.equals(""))
+          strWindowPath = strDefaultServlet;
+        printPageClosePopUp(response, vars, strWindowPath);
+        // log4j.error("Cancel took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("SPLIT")) {
+        strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
+        if (runingReconciliations.contains(strReconciliationId)) {
+          wait(strReconciliationId);
+        }
+        runingReconciliations.add(strReconciliationId);
+        String strBankStatementLineId = vars
+            .getRequiredStringParameter("inpFinBankStatementLineId");
+        String strTransactionId = vars.getSessionValue("AddTransaction|SelectedTransaction");
+        vars.setSessionValue("AddTransaction|SelectedTransaction", "");
+        if ("".equals(strTransactionId)) {
+          strTransactionId = vars.getRequiredStringParameter("inpSelectedFindTransactionId");
+        }
+        splitBankStatementLine(response, strReconciliationId, strBankStatementLineId,
+            strTransactionId);
+        // log4j.error("Split took: " + (System.currentTimeMillis() - init));
+      } else if (vars.commandIn("SAVE", "RECONCILE")) {
         OBContext.setAdminMode();
         try {
-          getSnapShot(reconciliation);
-          reconciledItems = reconciliation.getFINReconciliationLineVList().size();
-        } finally {
-          OBContext.restorePreviousMode();
-        }
-      }
-      if (MatchTransactionDao.getUnMatchedBankStatementLines(account).size() == 0
-          && reconciledItems == 0) {
-        OBError message = Utility.translateError(this, vars, vars.getLanguage(),
-            Utility.parseTranslation(this, vars, vars.getLanguage(), "@APRM_NoStatementsToMatch@"));
-        vars.setMessage(strTabId, message);
-        printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
-      } else {
-        if (reconciliation == null) {
-          reconciliation = MatchTransactionDao.addNewReconciliation(this, vars,
-              strFinancialAccountId);
-          getSnapShot(reconciliation);
-        } else {
-          updateReconciliation(vars, reconciliation.getId(), strFinancialAccountId, strTabId, false);
-        }
-
-        printPage(response, vars, strOrgId, strWindowId, strTabId, strPaymentTypeFilter,
-            strFinancialAccountId, reconciliation.getId(), strShowCleared, strHideDate);
-      }
-    } else if (vars.commandIn("GRID")) {
-      String strFinancialAccountId = vars.getRequestGlobalVariable("inpfinFinancialAccountId",
-          "MatchTransaction.finFinancialAccountId");
-      String strReconciliationId = vars.getRequestGlobalVariable("inpfinReconciliationId",
-          "MatchTransaction.finReconciliationId");
-      String strPaymentTypeFilter = vars.getRequestGlobalVariable("inpPaymentTypeFilter",
-          "MatchTransaction.paymentTypeFilter");
-      String strShowCleared = vars.getRequestGlobalVariable("inpShowCleared",
-          "MatchTransaction.showCleared");
-      String executeMatching = vars.getStringParameter("inpExecuteMatching", "Y");
-      if (strShowCleared.equals("")) {
-        strShowCleared = "N";
-        vars.setSessionValue("MatchTransaction.showCleared", strShowCleared);
-      }
-      String strHideDate = vars
-          .getRequestGlobalVariable("inphideDate", "MatchTransaction.hideDate");
-      if (strHideDate.equals("")) {
-        strHideDate = "N";
-        vars.setSessionValue("MatchTransaction.hideDate", strHideDate);
-      }
-      String showJSMessage = vars.getSessionValue("AddTransaction|ShowJSMessage");
-      vars.setSessionValue("AddTransaction|ShowJSMessage", "N");
-
-      printGrid(response, vars, strPaymentTypeFilter, strFinancialAccountId, strReconciliationId,
-          strShowCleared, strHideDate, showJSMessage, "Y".equals(executeMatching));
-    } else if (vars.commandIn("UNMATCH")) {
-      String strUnmatchBankStatementLineId = vars
-          .getRequiredStringParameter("inpFinBankStatementLineId");
-      unMatchBankStatementLine(response, strUnmatchBankStatementLineId);
-
-    } else if (vars.commandIn("CANCEL")) {
-      String strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
-      restoreSnapShot(OBDal.getInstance().get(FIN_Reconciliation.class, strReconciliationId));
-      String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
-      String strWindowPath = Utility.getTabURL(strTabId, "R", true);
-      if (strWindowPath.equals(""))
-        strWindowPath = strDefaultServlet;
-
-      printPageClosePopUp(response, vars, strWindowPath);
-    } else if (vars.commandIn("SPLIT")) {
-      String strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
-      String strBankStatementLineId = vars.getRequiredStringParameter("inpFinBankStatementLineId");
-      String strTransactionId = vars.getRequiredStringParameter("inpSelectedFindTransactionId");
-      splitBankStatementLine(response, strReconciliationId, strBankStatementLineId,
-          strTransactionId);
-    } else if (vars.commandIn("SAVE", "RECONCILE")) {
-      OBContext.setAdminMode();
-      try {
-        String strFinancialAccountId = vars.getRequiredStringParameter("inpfinFinancialAccountId");
-        // String strRecords = vars.getRequiredInParameter("inpRecordId", IsIDFilter.instance);
-        String strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
-        String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
-        String message = "";
-        // checkReconciliationPending(vars, strReconciliationId, strTabId);
-        if (message == null || message.length() == 0) {
-
-          String strRecordsChecked = vars.getInParameter("inpBankStatementLineId",
-              IsIDFilter.instance);
-          List<FIN_BankStatementLine> items = FIN_Utility.getOBObjectList(
-              FIN_BankStatementLine.class, strRecordsChecked);
-
-          for (FIN_BankStatementLine item : items) {
-            if (item.getFinancialAccountTransaction() != null) {
-              // Unmatch Transaction
-              FIN_FinaccTransaction oldTransaction = item.getFinancialAccountTransaction();
-              final String DEPOSITED_NOT_CLEARED = "RDNC";
-              final String WITHDRAWN_NOT_CLEARED = "PWNC";
-              oldTransaction
-                  .setStatus(oldTransaction.getDepositAmount()
-                      .subtract(oldTransaction.getPaymentAmount()).signum() == 1 ? DEPOSITED_NOT_CLEARED
-                      : WITHDRAWN_NOT_CLEARED);
-              oldTransaction.setReconciliation(null);
-              OBDal.getInstance().save(oldTransaction);
-            }
-            String strTransaction = vars.getStringParameter(
-                "inpFinancialTransactionId_" + item.getId(), "");
-            String strMatchingType = vars.getStringParameter("inpMatchingType_" + item.getId(),
-                FIN_MatchedTransaction.NOMATCH);
-            if (strTransaction == null || strTransaction.equalsIgnoreCase("")) {
-              item.setFinancialAccountTransaction(null);
-              item.setMatchingtype(FIN_MatchedTransaction.NOMATCH);
-            } else {
-              FIN_FinaccTransaction transactionLine = MatchTransactionDao.getObject(
-                  FIN_FinaccTransaction.class, strTransaction);
-              transactionLine.setReconciliation(MatchTransactionDao.getObject(
-                  FIN_Reconciliation.class, strReconciliationId));
-              if (isInArray(strRecordsChecked, item.getId())) {
-                transactionLine.setStatus("RPPC");
-                if (transactionLine.getFinPayment() != null) {
-                  transactionLine.getFinPayment().setStatus("RPPC");
-                }
-                if (item.getTransactionDate().compareTo(transactionLine.getTransactionDate()) < 0) {
-                  // Set processed to false before changing dates to avoid trigger exception
-                  boolean posted = "Y".equals(transactionLine.getPosted());
-                  if (posted) {
-                    transactionLine.setPosted("N");
-                    OBDal.getInstance().save(transactionLine);
-                    OBDal.getInstance().flush();
-                  }
-                  transactionLine.setProcessed(false);
-                  OBDal.getInstance().save(transactionLine);
-                  OBDal.getInstance().flush();
-                  transactionLine.setTransactionDate(item.getTransactionDate());
-                  transactionLine.setDateAcct(item.getTransactionDate());
-                  OBDal.getInstance().save(transactionLine);
-                  OBDal.getInstance().flush();
-                  // Set processed to true afterwards
-                  transactionLine.setProcessed(true);
-                  OBDal.getInstance().save(transactionLine);
-                  OBDal.getInstance().flush();
-                  if (posted) {
-                    transactionLine.setPosted("Y");
-                    OBDal.getInstance().save(transactionLine);
-                    OBDal.getInstance().flush();
-                  }
-                  // Changing dates for accounting entries as well
-                  TransactionsDao.updateAccountingDate(transactionLine);
-                }
-              } else {
-                boolean isReceipt = true;
-                if (transactionLine.getFinPayment() != null)
-                  isReceipt = transactionLine.getFinPayment().isReceipt();
-                else
-                  isReceipt = (transactionLine.getDepositAmount().compareTo(
-                      transactionLine.getPaymentAmount()) >= 0);
-                transactionLine.setStatus((isReceipt) ? "RDNC" : "PWNC");
-              }
-              OBDal.getInstance().save(transactionLine);
-              OBDal.getInstance().flush();
-              item.setFinancialAccountTransaction(transactionLine);
-              item.setMatchingtype(strMatchingType);
-              if (transactionLine.getFinPayment() != null)
-                item.setBusinessPartner(transactionLine.getFinPayment().getBusinessPartner());
-            }
-            OBDal.getInstance().save(item);
-            OBDal.getInstance().flush();
+          String strFinancialAccountId = vars
+              .getRequiredStringParameter("inpfinFinancialAccountId");
+          // String strRecords = vars.getRequiredInParameter("inpRecordId", IsIDFilter.instance);
+          strReconciliationId = vars.getRequiredStringParameter("inpfinReconciliationId");
+          if (runingReconciliations.contains(strReconciliationId)) {
+            wait(strReconciliationId);
           }
-          if (updateReconciliation(vars, strReconciliationId, strFinancialAccountId, strTabId,
+          runingReconciliations.add(strReconciliationId);
+          String strTabId = vars.getGlobalVariable("inpTabId", "MatchTransaction.adTabId");
+          if (updateReconciliation(strReconciliationId, strFinancialAccountId, strTabId,
               vars.commandIn("RECONCILE"))) {
             OBError msg = new OBError();
             msg.setType("Success");
             msg.setTitle(Utility.messageBD(this, "Success", vars.getLanguage()));
             vars.setMessage(strTabId, msg);
           }
+          // }
+          String strWindowPath = Utility.getTabURL(strTabId, "R", true);
+          if (strWindowPath.equals(""))
+            strWindowPath = strDefaultServlet;
+
+          printPageClosePopUp(response, vars, strWindowPath);
+        } finally {
+          OBContext.restorePreviousMode();
         }
-        String strWindowPath = Utility.getTabURL(strTabId, "R", true);
-        if (strWindowPath.equals(""))
-          strWindowPath = strDefaultServlet;
-
-        printPageClosePopUp(response, vars, strWindowPath);
-      } finally {
-        OBContext.restorePreviousMode();
+        // log4j.error("Save took: " + (System.currentTimeMillis() - init));
       }
+    } finally {
+      runingReconciliations.remove(strReconciliationId);
     }
   }
 
-  private boolean updateReconciliation(VariablesSecureApp vars, String strReconciliationId,
-      String strFinancialAccountId, String strTabId, boolean process) {
+  private boolean updateReconciliation(String strReconciliationId, String strFinancialAccountId,
+      String strTabId, boolean process) {
     OBContext.setAdminMode(true);
     try {
       FIN_Reconciliation reconciliation = MatchTransactionDao.getObject(FIN_Reconciliation.class,
@@ -343,12 +328,6 @@
     return true;
   }
 
-  private boolean isInArray(String inString, String value) {
-    if (inString.indexOf(value) == -1)
-      return false;
-    return true;
-  }
-
   private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strOrgId,
       String strWindowId, String strTabId, String strPaymentTypeFilter,
       String strFinancialAccountId, String reconciliationId, String strShowCleared,
@@ -363,6 +342,7 @@
     xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
     xmlDocument.setParameter("theme", vars.getTheme());
     final String MATCHED_AGAINST_TRANSACTION = FIN_Utility.messageBD("APRM_Transaction");
+    final String CONFIRMATION_MESSAGE = FIN_Utility.messageBD("APRM_AlgorithmConfirm");
 
     FIN_Reconciliation reconciliation = OBDal.getInstance().get(FIN_Reconciliation.class,
         reconciliationId);
@@ -373,6 +353,7 @@
     xmlDocument.setParameter("financialAccountId", strFinancialAccountId);
     xmlDocument.setParameter("reconciliationId", reconciliationId);
     xmlDocument.setParameter("matchedAgainstTransaction", MATCHED_AGAINST_TRANSACTION);
+    xmlDocument.setParameter("confirmationMessage", CONFIRMATION_MESSAGE);
     xmlDocument.setParameter("trlSplitConfirmText",
         FIN_Utility.messageBD("APRM_SplitBankStatementLineConfirm"));
 
@@ -437,8 +418,10 @@
     FieldProvider[] data = null;
     try {
       OBContext.setAdminMode(true);
+      // long init = System.currentTimeMillis();
       data = getMatchedBankStatementLinesData(vars, strFinancialAccountId, strReconciliationId,
           strPaymentTypeFilter, strShowCleared, strHideDate, executeMatching);
+      // log4j.error("Getting Grid Data: " + (System.currentTimeMillis() - init));
     } catch (Exception e) {
       log4j.debug("Output: Exception ocurred while retrieving Bank Statement Lines.", e);
       e.printStackTrace();
@@ -456,9 +439,11 @@
       log4j.debug("JSON object error" + table.toString());
     }
     response.setContentType("text/html; charset=UTF-8");
+    // long init = System.currentTimeMillis();
     PrintWriter out = response.getWriter();
     out.println("data = " + table.toString());
     out.close();
+    // log4j.error("Printing Grid Data: " + (System.currentTimeMillis() - init));
   }
 
   private void unMatchBankStatementLine(HttpServletResponse response,
@@ -493,23 +478,26 @@
         strFinancialAccountId);
     MatchingAlgorithm ma = financial.getMatchingAlgorithm();
     FIN_MatchingTransaction matchingTransaction = new FIN_MatchingTransaction(ma.getJavaClassName());
-
+    // long init = System.currentTimeMillis();
     List<FIN_BankStatementLine> bankLines = MatchTransactionDao.getMatchingBankStatementLines(
         strFinancialAccountId, strReconciliationId, strPaymentTypeFilter, strShowCleared);
+    // log4j.error("Getting bankLines took: " + (System.currentTimeMillis() - init));
     FIN_Reconciliation reconciliation = OBDal.getInstance().get(FIN_Reconciliation.class,
         strReconciliationId);
     FIN_BankStatementLine[] FIN_BankStatementLines = new FIN_BankStatementLine[0];
     FIN_BankStatementLines = bankLines.toArray(FIN_BankStatementLines);
     FieldProvider[] data = FieldProviderFactory.getFieldProviderArray(bankLines);
-
+    // init = System.currentTimeMillis();
     OBContext.setAdminMode();
     final String MATCHED_AGAINST_TRANSACTION = FIN_Utility.messageBD("APRM_Transaction");
     final String MATCHED_AGAINST_PAYMENT = FIN_Utility.messageBD("APRM_Payment");
     final String MATCHED_AGAINST_INVOICE = FIN_Utility.messageBD("APRM_Invoice");
     final String MATCHED_AGAINST_ORDER = FIN_Utility.messageBD("APRM_Order");
     final String MATCHED_AGAINST_CREDIT = FIN_Utility.messageBD("APRM_Credit");
+    HashMap<String, String> matchingTypes = getMatchingTypes();
     try {
       List<FIN_FinaccTransaction> excluded = new ArrayList<FIN_FinaccTransaction>();
+      // long initMatch = 0l;
       for (int i = 0; i < data.length; i++) {
         final String COLOR_STRONG = "#66CC00";
         final String COLOR_WEAK = "#99CC66";
@@ -521,49 +509,41 @@
 
         String matchingType = line.getMatchingtype();
         FIN_FinaccTransaction transaction = line.getFinancialAccountTransaction();
-        if (transaction == null && executeMatching) {
+        if (transaction == null) {
           FIN_MatchedTransaction matched = null;
-          // try to match if exception is thrown continue
-          try {
-            matched = matchingTransaction.match(line, excluded);
-            OBDal.getInstance().getConnection().commit();
-          } catch (Exception e) {
-            OBDal.getInstance().rollbackAndClose();
+          if (executeMatching) {
+            // try to match if exception is thrown continue
+            try {
+              long initMatchLine = System.currentTimeMillis();
+              matched = matchingTransaction.match(line, excluded);
+              // initMatch = initMatch + (System.currentTimeMillis() - initMatchLine);
+              OBDal.getInstance().getConnection().commit();
+            } catch (Exception e) {
+              OBDal.getInstance().rollbackAndClose();
+              line = OBDal.getInstance().get(FIN_BankStatementLine.class,
+                  FIN_BankStatementLines[i].getId());
+              matchingType = line.getMatchingtype();
+              transaction = line.getFinancialAccountTransaction();
+              matched = new FIN_MatchedTransaction(null, FIN_MatchedTransaction.NOMATCH);
+            }
+          } else {
             matched = new FIN_MatchedTransaction(null, FIN_MatchedTransaction.NOMATCH);
           }
+          transaction = matched.getTransaction();
+          if (transaction != null) {
+            matchBankStatementLine(line.getId(), transaction.getId(), strReconciliationId,
+                matched.getMatchLevel());
+          }
           // When hide flag checked then exclude matchings for transactions out of date range
           if ("Y".equals(strHideDate)
               && matched.getTransaction() != null
               && matched.getTransaction().getTransactionDate()
                   .compareTo(reconciliation.getEndingDate()) > 0) {
+            transaction = null;
             matched = new FIN_MatchedTransaction(null, FIN_MatchedTransaction.NOMATCH);
-          }
-          transaction = matched.getTransaction();
-          if (transaction != null && FIN_MatchedTransaction.STRONG.equals(matched.getMatchLevel())) {
-            FIN_BankStatementLine bsl = line;
-            if (bsl.getFinancialAccountTransaction() != null) {
-              // Unmatch Transaction
-              FIN_FinaccTransaction oldTransaction = bsl.getFinancialAccountTransaction();
-              final String DEPOSITED_NOT_CLEARED = "RDNC";
-              final String WITHDRAWN_NOT_CLEARED = "PWNC";
-              oldTransaction
-                  .setStatus(oldTransaction.getDepositAmount()
-                      .subtract(oldTransaction.getPaymentAmount()).signum() == 1 ? DEPOSITED_NOT_CLEARED
-                      : WITHDRAWN_NOT_CLEARED);
-              oldTransaction.setReconciliation(null);
-              OBDal.getInstance().save(oldTransaction);
-            }
-            bsl.setFinancialAccountTransaction(transaction);
-            bsl.setMatchingtype(matched.getMatchLevel());
-            transaction.setStatus("RPPC");
-            transaction.setReconciliation(MatchTransactionDao.getObject(FIN_Reconciliation.class,
-                strReconciliationId));
-            if (transaction.getFinPayment() != null) {
-              transaction.getFinPayment().setStatus("RPPC");
-            }
-            OBDal.getInstance().save(transaction);
-            OBDal.getInstance().save(bsl);
-            OBDal.getInstance().flush();
+            unmatch(line);
+            line = OBDal.getInstance().get(FIN_BankStatementLine.class,
+                FIN_BankStatementLines[i].getId());
           }
           if (transaction != null) {
             excluded.add(transaction);
@@ -604,12 +584,16 @@
                         : ((FIN_MatchedTransaction.NOMATCH.equals(matchingType) || FIN_MatchedTransaction.MANUALMATCH
                             .equals(matchingType)) ? COLOR_WHITE : matchingType)));
         FieldProviderFactory.setField(data[i], "matchingType", matchingType);
+        FieldProviderFactory.setField(data[i], "matchingTypeDescription", "");
 
         if (transaction != null) {
           FieldProviderFactory.setField(data[i], "disabled", "N");
+          FieldProviderFactory.setField(data[i], "matchingTypeDescription",
+              matchingTypes.get(matchingType));
           // Auto Matching or already matched
-          FieldProviderFactory.setField(data[i], "checked",
-              FIN_MatchedTransaction.STRONG.equals(matchingType) || alreadyMatched ? "Y" : "N");
+          // FieldProviderFactory.setField(data[i], "checked",
+          // FIN_MatchedTransaction.STRONG.equals(matchingType) || alreadyMatched ? "Y" : "N");
+          FieldProviderFactory.setField(data[i], "checked", "Y");
           FieldProviderFactory.setField(data[i], "finTransactionId", transaction.getId());
           FieldProviderFactory.setField(data[i], "trxDescription", transaction.getDescription());
           FieldProviderFactory
@@ -662,12 +646,49 @@
           FieldProviderFactory.setField(data[i], "transactionAmount", "");
         }
       }
+      // log4j.error("matching took: " + initMatch);
     } finally {
       OBContext.restorePreviousMode();
     }
+    // log4j.error("Getting fieldprovider took: " + (System.currentTimeMillis() - init));
     return data;
   }
 
+  private HashMap<String, String> getMatchingTypes() {
+    final Reference MATCHING_TYPE_REFERENCE = OBDal.getInstance().get(Reference.class,
+        "BCABCED4983A4ECB814A6D142593ACEA");
+    HashMap<String, String> result = new HashMap<String, String>();
+    OBContext.setAdminMode(false);
+    try {
+      OBCriteria<org.openbravo.model.ad.domain.List> obc = OBDal.getInstance().createCriteria(
+          org.openbravo.model.ad.domain.List.class);
+      obc.add(Restrictions.eq(org.openbravo.model.ad.domain.List.PROPERTY_REFERENCE,
+          MATCHING_TYPE_REFERENCE));
+      for (org.openbravo.model.ad.domain.List element : obc.list()) {
+        List<ListTrl> trlList = element.getADListTrlList();
+        if (trlList.size() > 0) {
+          boolean found = false;
+          for (ListTrl trl : trlList) {
+            if (trl.getLanguage().getLanguage()
+                .equals(OBContext.getOBContext().getLanguage().getLanguage())) {
+              result.put(element.getSearchKey(), trl.getName());
+              found = true;
+              break;
+            }
+          }
+          if (!found) {
+            result.put(element.getSearchKey(), element.getName());
+          }
+        } else {
+          result.put(element.getSearchKey(), element.getName());
+        }
+      }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    return result;
+  }
+
   public String checkReconciliationNotProcessed(VariablesSecureApp vars,
       String strReconciliationId, String strTabId) {
     FIN_Reconciliation reconciliation = MatchTransactionDao.getObject(FIN_Reconciliation.class,
@@ -704,8 +725,9 @@
   }
 
   private void getSnapShot(FIN_Reconciliation reconciliation) {
-    if (reconciliation == null)
+    if (reconciliation == null) {
       return;
+    }
     OBContext.setAdminMode();
     try {
       // First remove old temp info if exists
@@ -804,21 +826,29 @@
   private void unmatch(FIN_BankStatementLine bsline) {
     OBContext.setAdminMode();
     try {
-      // merge if the bank statement line was splited before
+      bsline = OBDal.getInstance().get(FIN_BankStatementLine.class, bsline.getId());
+      // merge if the bank statement line was split before
       mergeBankStatementLine(bsline);
 
       FIN_FinaccTransaction finTrans = bsline.getFinancialAccountTransaction();
+      if (finTrans == null) {
+        String strTransactionId = vars.getStringParameter("inpFinancialTransactionId_"
+            + bsline.getId());
+        if (strTransactionId != null && !"".equals(strTransactionId)) {
+          finTrans = OBDal.getInstance().get(FIN_FinaccTransaction.class, strTransactionId);
+        }
+      }
       if (finTrans != null) {
         finTrans.setReconciliation(null);
         finTrans.setStatus((finTrans.getDepositAmount().subtract(finTrans.getPaymentAmount())
             .signum() == 1) ? "RDNC" : "PWNC");
         bsline.setFinancialAccountTransaction(null);
         OBDal.getInstance().save(finTrans);
-        OBDal.getInstance().flush();
+        // OBDal.getInstance().flush();
       }
       bsline.setMatchingtype(null);
       OBDal.getInstance().save(bsline);
-      OBDal.getInstance().flush();
+      // OBDal.getInstance().flush();
 
       if (finTrans != null) {
         if (finTrans.getFinPayment() != null) {
@@ -834,7 +864,7 @@
         finTrans.setStatus(isReceipt ? "RDNC" : "PWNC");
         finTrans.setReconciliation(null);
         OBDal.getInstance().save(finTrans);
-        OBDal.getInstance().flush();
+        // OBDal.getInstance().flush();
       }
       // Execute un-matching logic defined by algorithm
       MatchingAlgorithm ma = bsline.getBankStatement().getAccount().getMatchingAlgorithm();
@@ -855,7 +885,7 @@
         OBDal.getInstance().save(bs);
         OBDal.getInstance().flush();
       }
-
+      OBDal.getInstance().getConnection().commit();
     } catch (Exception e) {
       throw new OBException(e);
     } finally {
@@ -1293,4 +1323,53 @@
   public String getServletInfo() {
     return "This servlet match imported bank statement lines for a financial account";
   }
+
+  void matchBankStatementLine(String strFinBankStatementLineId, String strFinancialTransactionId,
+      String strReconciliationId, String matchLevel) {
+    OBContext.setAdminMode(false);
+    try {
+      FIN_BankStatementLine bsl = OBDal.getInstance().get(FIN_BankStatementLine.class,
+          strFinBankStatementLineId);
+      // OBDal.getInstance().getSession().buildLockRequest(LockOptions.NONE)
+      // .lock(BankStatementLine.ENTITY_NAME, bsl);
+      FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
+          strFinancialTransactionId);
+      if (transaction != null) {
+        if (bsl.getFinancialAccountTransaction() != null) {
+          log4j.error("Bank Statement Line Already Matched: " + bsl.getIdentifier());
+          unmatch(bsl);
+        }
+        bsl.setFinancialAccountTransaction(transaction);
+        if (matchLevel == null || "".equals(matchLevel)) {
+          matchLevel = FIN_MatchedTransaction.MANUALMATCH;
+        }
+        bsl.setMatchingtype(matchLevel);
+        transaction.setStatus("RPPC");
+        transaction.setReconciliation(MatchTransactionDao.getObject(FIN_Reconciliation.class,
+            strReconciliationId));
+        if (transaction.getFinPayment() != null) {
+          transaction.getFinPayment().setStatus("RPPC");
+        }
+        OBDal.getInstance().save(transaction);
+        OBDal.getInstance().save(bsl);
+        OBDal.getInstance().flush();
+        OBDal.getInstance().getConnection().commit();
+      }
+    } catch (Exception e) {
+      log4j.error("Error during matchBankStatementLine");
+      OBDal.getInstance().rollbackAndClose();
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
+  private void wait(String strReconciliationId) {
+    while (runingReconciliations.contains(strReconciliationId)) {
+      long t0, t1;
+      t0 = System.currentTimeMillis();
+      do {
+        t1 = System.currentTimeMillis();
+      } while ((t1 - t0) < 200);
+    }
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -39,6 +39,7 @@
     <PARAMETER id="fieldhideDate" name="hideDate" boolean="checked" withId="paramChecked"/>
     <PARAMETER id="paramPaymentTypeFilter" name="paramPaymentTypeFilter"/>
     <PARAMETER id="paraMatchedAgainstTransaction" name="matchedAgainstTransaction" attribute="value"/>
+    <PARAMETER id="paramConfirmationMessage" name="confirmationMessage" attribute="value"/>
     <PARAMETER id="paramTrlSplitConfirmText" name="trlSplitConfirmText" attribute="value"/>
     <SUBREPORT id="inpPaymentTypeFilter" name="reportPaymentTypeFilter" report="org/openbravo/erpCommon/reference/List">
       <ARGUMENT name="parameterListSelected" withId="paramPaymentTypeFilter"/>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransactionGrid.srpt	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransactionGrid.srpt	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -27,15 +27,16 @@
     <td class="DataGrid_Body_Cell"><span id="fieldBLReferenceNo">xx11100011</span></td>
     <td class="DataGrid_Body_Cell_Amount"><span id="fieldAmount">xx12233</span></td>
     <td class="DataGrid_Body_LineNoCell" style="background-color: xx; text-align: center;" id="inpMatchStyle_xx" name="inpMatchStyle_xx">
-      <a href="#" onClick="openSelector('xx');" id="fieldFindLink"><img src="../../../../../web/org.openbravo.advpaymentmngt/images/view.png" style="border-style: none"/></a>
+      <a href="#" onClick="openSelector('xx');" id="fieldFindLink" name="fieldFindLink"><img src="../../../../../web/org.openbravo.advpaymentmngt/images/view.png" style="border-style: none"/></a>
       <!--span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span-->
       <input id="inpCheckBox_xx" type="checkbox" name="inpBankStatementLineId" value="" onclick="unMatchLine('xx', this.checked); "/>
       <input type="hidden" name="inpFinancialTransactionId_xx" id="inpFinancialTransactionId_xx" value=""></input>
       <input type="hidden" name="inpMatchingType_xx" id="inpMatchingType_xx" value=""></input>
       <!--span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span-->
-      <a href="#" onclick="openAddTransaction('xx');" id="fieldAddLink"><img src="../../../../../web/org.openbravo.advpaymentmngt/images/add.png" style="border-style: none"/></a>
+      <a href="#" onclick="openAddTransaction('xx');" id="fieldAddLink" name="fieldAddLink"><img src="../../../../../web/org.openbravo.advpaymentmngt/images/add.png" style="border-style: none"/></a>
     </td>
-    <td class="DataGrid_Body_Cell" id="inpMatchedDocument_xx">xxTransaction</td>
+    <td class="DataGrid_Body_Cell" id="inpMatchedDocument_xx" title="">xxTransaction</td>
+    <td class="DataGrid_Body_Cell" id="inpMatchType_xx" title="">xxMatchType</td>
     <td class="DataGrid_Body_Cell" id="inpTransactionDate_xx" title="">xx01-01-2010</td>
     <td class="DataGrid_Body_Cell" id="inpBPartner_xx" title="">xxBP Name</td>
     <td class="DataGrid_Body_Cell" id="inpReferenceNo_xx" title="">xx111999111</td>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransactionGrid.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransactionGrid.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -51,12 +51,16 @@
     <FIELD id="inpMatchingType_xx" attribute="value">matchingType</FIELD>
     <FIELD id="inpMatchingType_xx" attribute="name" replace="xx">finBankLineId</FIELD>
     <FIELD id="inpMatchingType_xx" attribute="id" replace="xx">finBankLineId</FIELD>
+    <FIELD id="inpMatchType_xx">matchingTypeDescription</FIELD>
+    <FIELD id="inpMatchType_xx" attribute="id" replace="xx">finBankLineId</FIELD>
+    <FIELD id="inpMatchType_xx" attribute="title">trxDescription</FIELD>
     <FIELD id="fieldAddLink" attribute="onclick" replace="xx">finBankLineId</FIELD>
     <FIELD id="inpTransactionDate_xx">transactionDate</FIELD>
     <FIELD id="inpTransactionDate_xx" attribute="title">trxDescription</FIELD>
     <FIELD id="inpTransactionDate_xx" attribute="id" replace="xx">finBankLineId</FIELD>
     <FIELD id="inpMatchedDocument_xx">matchedDocument</FIELD>
     <FIELD id="inpMatchedDocument_xx" attribute="id" replace="xx">finBankLineId</FIELD>
+    <FIELD id="inpMatchedDocument_xx" attribute="title">trxDescription</FIELD>
     <FIELD id="inpBPartner_xx">transactionBPartner</FIELD>
     <FIELD id="inpBPartner_xx" attribute="title">trxDescription</FIELD>
     <FIELD id="inpBPartner_xx" attribute="id" replace="xx">finBankLineId</FIELD>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ReconciliationGrid.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ReconciliationGrid.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -26,8 +26,7 @@
     <FIELD id="fieldRownum1">rownum</FIELD>
     <FIELD id="fieldSelectedTransactionId" attribute="value">markSelectedId</FIELD>
     <FUNCTION id="funcEvenOddRowxx" name="MODULE" arg1="fieldRownum1" arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
-    <FIELD id="fieldTransactionId" boolean="checked" withId="fieldSelectedTransactionId">transactionId</FIELD>
-    <FIELD id="fieldTransactionId" attribute="value">transactionId</FIELD>
+
     <FIELD id="fieldTransactionDate">transactionDate</FIELD>
     <FIELD id="fieldBusinessPartner">businessPartnerTrunc</FIELD>
     <FIELD id="fieldBusinessPartner" attribute="title" replace="zz">businessPartner</FIELD>
@@ -42,7 +41,8 @@
     <FIELD id="fieldRecordDepositAmt" attribute="value" format="euroEdition">depositAmount</FIELD>
     <FIELD id="fieldRecordPaymentAmt" attribute="name" replace="xx">transactionId</FIELD>
     <FIELD id="fieldRecordDepositAmt" attribute="name" replace="xx">transactionId</FIELD>
-   
+    
+    <FIELD id="fieldTransactionId_xx" boolean="checked" withId="fieldSelectedTransactionId">transactionId</FIELD>
     <FIELD id="fieldTransactionId_xx" attribute="value">transactionId</FIELD>
     <FIELD id="fieldTransactionId_xx" attribute="id">transactionId</FIELD>
     <FIELD id="fieldTransactionId_xx" attribute="onclick" replace="xx">transactionId</FIELD>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Wed Aug 07 09:31:14 2013 +0200
@@ -113,6 +113,8 @@
           journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLine.getId());
           if (journalLine.isOpenItems() && journalLine.getRelatedPayment() == null) {
             // Create bundle
+            vars = new VariablesSecureApp(varsAux.getUser(), varsAux.getClient(), varsAux.getOrg(),
+                varsAux.getRole());
             ProcessBundle pb = new ProcessBundle("DE1B382FDD2540199D223586F6E216D0", vars)
                 .init(conn);
             HashMap<String, Object> parameters = new HashMap<String, Object>();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Aug 07 09:31:14 2013 +0200
@@ -94,6 +94,9 @@
             payment.setStatus(payment.isReceipt() ? "RDNC" : "PWNC");
             transaction.setStatus(payment.isReceipt() ? "RDNC" : "PWNC");
             OBDal.getInstance().save(payment);
+            if (transaction.getDescription() == null || "".equals(transaction.getDescription())) {
+              transaction.setDescription(payment.getDescription());
+            }
           } else {
             transaction.setStatus(transaction.getDepositAmount().compareTo(
                 transaction.getPaymentAmount()) > 0 ? "RDNC" : "PWNC");
@@ -161,8 +164,8 @@
           }
           OBDal.getInstance().save(transaction);
           OBDal.getInstance().flush();
-          bundle.setResult(msg);
         }
+        bundle.setResult(msg);
       } finally {
         OBContext.restorePreviousMode();
       }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Wed Aug 07 09:31:14 2013 +0200
@@ -30,6 +30,7 @@
 
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.process.FIN_AddPayment;
@@ -58,6 +59,7 @@
   private FIN_FinancialAccount financialAccount;
   OBError myError = null;
   String filename = "";
+  private static Logger log4j = Logger.getLogger(FIN_BankStatementImport.class);
 
   public static final String DOCUMENT_BankStatementFile = "BSF";
 
@@ -156,7 +158,7 @@
       bankStatementLines = loadFile(file, bankStatement);
     } catch (Exception e) {
       OBDal.getInstance().rollbackAndClose();
-      return getMyError();
+      return getOBError(conn, vars, "@APRM_InvalidOrMissingValues@", "Error", "Error");
     }
     if (bankStatementLines == null || bankStatementLines.size() == 0) {
       OBDal.getInstance().rollbackAndClose();
@@ -173,6 +175,7 @@
       setMyError(processResult);
     } catch (Exception e) {
       OBDal.getInstance().rollbackAndClose();
+      log4j.error("Error importing file.", e);
       return getMyError();
     }
     if (getMyError() != null && !getMyError().getType().toLowerCase().equals("success")
@@ -433,7 +436,8 @@
     for (BusinessPartner bp : businessPartners) {
       // Calculates distance between two strings meaning number of changes required for a string to
       // convert in another string
-      int bpDistance = StringUtils.getLevenshteinDistance(partnername, bp.getName().toLowerCase());
+      int bpDistance = StringUtils.getLevenshteinDistance(parsedPartnername, bp.getName()
+          .toLowerCase());
       if (bpDistance < distance) {
         distance = bpDistance;
         targetBusinessPartner = bp;
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.20831]]></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>
@@ -22,7 +22,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <UPDATEINFO><![CDATA[Bug fixing.]]></UPDATEINFO>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--C70732EA90A14EC0916078B85CC33D2D--></AD_MODULE>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.20831]]></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/model/tables/OBUIAPP_PARAMETER.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -109,6 +109,21 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="AD_VAL_RULE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_FIELDGROUP_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="READONLYLOGIC" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_VAL_RULE" name="OBUIAPP_PARAM_AD_VALRULE">
+        <reference local="AD_VAL_RULE_ID" foreign="AD_VAL_RULE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_PARAMETER_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -121,6 +136,9 @@
       <foreign-key foreignTable="AD_ORG" name="OBUIAPP_PARAMETER_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_FIELDGROUP" name="OBUIAPP_PARAMETER_FLDGRP">
+        <reference local="AD_FIELDGROUP_ID" foreign="AD_FIELDGROUP_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="OBUIAPP_PROCESS" name="OBUIAPP_PARAMETER_PROCESS">
         <reference local="OBUIAPP_PROCESS_ID" foreign="OBUIAPP_PROCESS_ID"/>
       </foreign-key>
@@ -130,6 +148,9 @@
       <foreign-key foreignTable="AD_REFERENCE" name="OBUIAPP_PARAMETER_REFERENCE_V">
         <reference local="AD_REFERENCE_VALUE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
+      <index name="OBUIAPP_PARAMETER_PROCESS" unique="false">
+        <index-column name="OBUIAPP_PROCESS_ID"/>
+      </index>
       <check name="OBUIAPP_PARAMETER_CENTR_CHK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_EVFIXVAL_CHK"><![CDATA[EVALUATEFIXEDVALUE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -2307,7 +2307,7 @@
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--6D0A663C73C646E3808A2D00D63BC55E-->  <POSITION><![CDATA[28]]></POSITION>
+<!--6D0A663C73C646E3808A2D00D63BC55E-->  <POSITION><![CDATA[27]]></POSITION>
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--6D0A663C73C646E3808A2D00D63BC55E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -3578,6 +3578,9 @@
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--927DA01A83363AFAE040A8C0CF072B85-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT COALESCE(MAX(SeqNo),0)+10 AS DefaultValue FROM OBUIAPP_Parameter 
+WHERE (OBUIAPP_Process_ID is not null and OBUIAPP_Process_ID=@OBUIAPP_Process_ID@)
+or  (EM_OBKMO_Widget_Class_ID is not null and EM_OBKMO_Widget_Class_ID = @OBKMO_Widget_Class_ID@)]]></DEFAULTVALUE>
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--927DA01A83363AFAE040A8C0CF072B85-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
@@ -5085,6 +5088,42 @@
 <!--A34BC91496324096BA474D308C64B716-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--A34BC91496324096BA474D308C64B716--></AD_COLUMN>
 
+<!--A35E96B6DAC1441D89A64BFF46E4E35F--><AD_COLUMN>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_COLUMN_ID><![CDATA[A35E96B6DAC1441D89A64BFF46E4E35F]]></AD_COLUMN_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <NAME><![CDATA[Validation]]></NAME>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <DESCRIPTION><![CDATA[A validation rule that defines how an entry is determined to be valid or invalid.]]></DESCRIPTION>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <HELP><![CDATA[The Validation Rule indicates a unique validation rule.  These rules define how an entry is determined to valid or invalid.]]></HELP>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <COLUMNNAME><![CDATA[AD_Val_Rule_ID]]></COLUMNNAME>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_VAL_RULE_ID><![CDATA[D3CD12B927AC4A1B8FCC6FE03E194CF4]]></AD_VAL_RULE_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_ELEMENT_ID><![CDATA[139]]></AD_ELEMENT_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <POSITION><![CDATA[29]]></POSITION>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F--></AD_COLUMN>
+
 <!--A48D490770CF4C05BFB061DC5E752060--><AD_COLUMN>
 <!--A48D490770CF4C05BFB061DC5E752060-->  <AD_COLUMN_ID><![CDATA[A48D490770CF4C05BFB061DC5E752060]]></AD_COLUMN_ID>
 <!--A48D490770CF4C05BFB061DC5E752060-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -5584,6 +5623,41 @@
 <!--BBA0362A5E424CDDBFA2A008A942F218-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--BBA0362A5E424CDDBFA2A008A942F218--></AD_COLUMN>
 
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2--><AD_COLUMN>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_COLUMN_ID><![CDATA[BD4A8B0F15B542EE939DAC95BF18EAE2]]></AD_COLUMN_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <NAME><![CDATA[Field Group]]></NAME>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <DESCRIPTION><![CDATA[A classification of similar fields.]]></DESCRIPTION>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <HELP><![CDATA[The Field Group indicates the logical group that this field belongs to (History, Amounts, Quantities)]]></HELP>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <COLUMNNAME><![CDATA[AD_Fieldgroup_ID]]></COLUMNNAME>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_ELEMENT_ID><![CDATA[1500]]></AD_ELEMENT_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <POSITION><![CDATA[30]]></POSITION>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2--></AD_COLUMN>
+
 <!--C42A9A71AA1D4DCBA648182611824A21--><AD_COLUMN>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <AD_COLUMN_ID><![CDATA[C42A9A71AA1D4DCBA648182611824A21]]></AD_COLUMN_ID>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -6234,6 +6308,41 @@
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA--></AD_COLUMN>
 
+<!--E112C5B101B6435EB88E9B3914A1CBCC--><AD_COLUMN>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_COLUMN_ID><![CDATA[E112C5B101B6435EB88E9B3914A1CBCC]]></AD_COLUMN_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <NAME><![CDATA[Read Only Logic]]></NAME>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <DESCRIPTION><![CDATA[Logic to determine if field is read only (applies only when field is read-write)]]></DESCRIPTION>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <HELP><![CDATA[Logic to determine if field is read only (applies only when field is read-write)]]></HELP>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <COLUMNNAME><![CDATA[Readonlylogic]]></COLUMNNAME>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_REFERENCE_ID><![CDATA[14]]></AD_REFERENCE_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <FIELDLENGTH><![CDATA[2000]]></FIELDLENGTH>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <SEQNO><![CDATA[310]]></SEQNO>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_ELEMENT_ID><![CDATA[1663]]></AD_ELEMENT_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <POSITION><![CDATA[31]]></POSITION>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--E112C5B101B6435EB88E9B3914A1CBCC--></AD_COLUMN>
+
 <!--E149C7E04CF24A5089E960D968F4E7DE--><AD_COLUMN>
 <!--E149C7E04CF24A5089E960D968F4E7DE-->  <AD_COLUMN_ID><![CDATA[E149C7E04CF24A5089E960D968F4E7DE]]></AD_COLUMN_ID>
 <!--E149C7E04CF24A5089E960D968F4E7DE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_DATASET_TABLE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_DATASET_TABLE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,5 +1,19 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--49F3F09E8FC9476F9A70A9828B7B754D--><AD_DATASET_TABLE>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_DATASET_TABLE_ID><![CDATA[49F3F09E8FC9476F9A70A9828B7B754D]]></AD_DATASET_TABLE_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_DATASET_ID><![CDATA[D81C5C810AEF47C690E4F688ABC8AAC8]]></AD_DATASET_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_TABLE_ID><![CDATA[FF80818132D85DB50132D860924E0004]]></AD_TABLE_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <WHERECLAUSE><![CDATA[client.id=:ClientID]]></WHERECLAUSE>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <EXCLUDEAUDITINFO><![CDATA[N]]></EXCLUDEAUDITINFO>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <ISBUSINESSOBJECT><![CDATA[N]]></ISBUSINESSOBJECT>
+<!--49F3F09E8FC9476F9A70A9828B7B754D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--49F3F09E8FC9476F9A70A9828B7B754D--></AD_DATASET_TABLE>
+
 <!--6BA89D87574D49EA84F641C20E21DE3E--><AD_DATASET_TABLE>
 <!--6BA89D87574D49EA84F641C20E21DE3E-->  <AD_DATASET_TABLE_ID><![CDATA[6BA89D87574D49EA84F641C20E21DE3E]]></AD_DATASET_TABLE_ID>
 <!--6BA89D87574D49EA84F641C20E21DE3E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -78,7 +78,7 @@
 <!--03743E0195424F98A7FB273DCB1757EF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--03743E0195424F98A7FB273DCB1757EF-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--03743E0195424F98A7FB273DCB1757EF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--03743E0195424F98A7FB273DCB1757EF-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--03743E0195424F98A7FB273DCB1757EF-->  <SEQNO><![CDATA[100]]></SEQNO>
 <!--03743E0195424F98A7FB273DCB1757EF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--03743E0195424F98A7FB273DCB1757EF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--03743E0195424F98A7FB273DCB1757EF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -249,14 +249,14 @@
 <!--068027F31C744B148FA0A460145A4972-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--068027F31C744B148FA0A460145A4972-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
 <!--068027F31C744B148FA0A460145A4972-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--068027F31C744B148FA0A460145A4972-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--068027F31C744B148FA0A460145A4972-->  <SEQNO><![CDATA[220]]></SEQNO>
 <!--068027F31C744B148FA0A460145A4972-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--068027F31C744B148FA0A460145A4972-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--068027F31C744B148FA0A460145A4972-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--068027F31C744B148FA0A460145A4972-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--068027F31C744B148FA0A460145A4972-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--068027F31C744B148FA0A460145A4972-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--068027F31C744B148FA0A460145A4972-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--068027F31C744B148FA0A460145A4972-->  <STARTINODDCOLUMN><![CDATA[Y]]></STARTINODDCOLUMN>
 <!--068027F31C744B148FA0A460145A4972-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--068027F31C744B148FA0A460145A4972-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--068027F31C744B148FA0A460145A4972-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
@@ -421,7 +421,6 @@
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <SEQNO><![CDATA[210]]></SEQNO>
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--0F2F081D4F7D423FB52A1D9FBDADAC24-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -614,7 +613,6 @@
 <!--1C48BED1F1104B80817A440331443C86-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--1C48BED1F1104B80817A440331443C86-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--1C48BED1F1104B80817A440331443C86-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1C48BED1F1104B80817A440331443C86-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--1C48BED1F1104B80817A440331443C86-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1C48BED1F1104B80817A440331443C86-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1C48BED1F1104B80817A440331443C86-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -1411,7 +1409,7 @@
 <!--52520B70D8F34A63832653BA48829360-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--52520B70D8F34A63832653BA48829360-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--52520B70D8F34A63832653BA48829360-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--52520B70D8F34A63832653BA48829360-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--52520B70D8F34A63832653BA48829360-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--52520B70D8F34A63832653BA48829360-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--52520B70D8F34A63832653BA48829360-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--52520B70D8F34A63832653BA48829360-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -1497,7 +1495,7 @@
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5990B2D4A3AA4FB7A8F1E340540524EF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -1737,6 +1735,34 @@
 <!--67BFC51699894C3F80679B1C9B1D7DD3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--67BFC51699894C3F80679B1C9B1D7DD3--></AD_FIELD>
 
+<!--69E88E1C0E22480CAF8269EAE69E69FA--><AD_FIELD>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_FIELD_ID><![CDATA[69E88E1C0E22480CAF8269EAE69E69FA]]></AD_FIELD_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <NAME><![CDATA[Field Group]]></NAME>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <DESCRIPTION><![CDATA[A classification of similar fields.]]></DESCRIPTION>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <HELP><![CDATA[The Field Group indicates the logical group that this field belongs to (History, Amounts, Quantities)]]></HELP>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_COLUMN_ID><![CDATA[BD4A8B0F15B542EE939DAC95BF18EAE2]]></AD_COLUMN_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--69E88E1C0E22480CAF8269EAE69E69FA-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--69E88E1C0E22480CAF8269EAE69E69FA--></AD_FIELD>
+
 <!--6C72CD69B5A74DFEA06DF7D257A1C39C--><AD_FIELD>
 <!--6C72CD69B5A74DFEA06DF7D257A1C39C-->  <AD_FIELD_ID><![CDATA[6C72CD69B5A74DFEA06DF7D257A1C39C]]></AD_FIELD_ID>
 <!--6C72CD69B5A74DFEA06DF7D257A1C39C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1822,6 +1848,34 @@
 <!--748D89AC034A40DAB353414EEE278C07-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--748D89AC034A40DAB353414EEE278C07--></AD_FIELD>
 
+<!--76CAB6BE742942CD89029B72F155A6C6--><AD_FIELD>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_FIELD_ID><![CDATA[76CAB6BE742942CD89029B72F155A6C6]]></AD_FIELD_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <NAME><![CDATA[Read Only Logic]]></NAME>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <DESCRIPTION><![CDATA[Logic to determine if field is read only (applies only when field is read-write)]]></DESCRIPTION>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <HELP><![CDATA[Logic to determine if field is read only (applies only when field is read-write)]]></HELP>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_COLUMN_ID><![CDATA[E112C5B101B6435EB88E9B3914A1CBCC]]></AD_COLUMN_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--76CAB6BE742942CD89029B72F155A6C6-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--76CAB6BE742942CD89029B72F155A6C6--></AD_FIELD>
+
 <!--7895CDC316C84F95A564A5356E32878A--><AD_FIELD>
 <!--7895CDC316C84F95A564A5356E32878A-->  <AD_FIELD_ID><![CDATA[7895CDC316C84F95A564A5356E32878A]]></AD_FIELD_ID>
 <!--7895CDC316C84F95A564A5356E32878A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1978,7 +2032,7 @@
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <DISPLAYLOGIC><![CDATA[@Isfixed@='Y']]></DISPLAYLOGIC>
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <DISPLAYLENGTH><![CDATA[1000]]></DISPLAYLENGTH>
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--7DBEE8C8688142D79226175B9F703DC4-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--7DBEE8C8688142D79226175B9F703DC4-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7DBEE8C8688142D79226175B9F703DC4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -2122,15 +2176,15 @@
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--865E6707D439406D8F3C60819C372B9E-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--865E6707D439406D8F3C60819C372B9E-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--865E6707D439406D8F3C60819C372B9E-->  <SEQNO><![CDATA[210]]></SEQNO>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--865E6707D439406D8F3C60819C372B9E-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--865E6707D439406D8F3C60819C372B9E-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--865E6707D439406D8F3C60819C372B9E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--865E6707D439406D8F3C60819C372B9E-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--865E6707D439406D8F3C60819C372B9E-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--865E6707D439406D8F3C60819C372B9E-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--865E6707D439406D8F3C60819C372B9E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--865E6707D439406D8F3C60819C372B9E--></AD_FIELD>
@@ -2515,7 +2569,7 @@
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <DISPLAYLOGIC><![CDATA[@Isfixed@='Y']]></DISPLAYLOGIC>
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--A919733DDDA74DD9B3D67EC72600CCD4-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--A919733DDDA74DD9B3D67EC72600CCD4-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--A919733DDDA74DD9B3D67EC72600CCD4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -2715,7 +2769,7 @@
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--B81232E55F9C44FE821E8BACBDFF2E94-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--B81232E55F9C44FE821E8BACBDFF2E94-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--B81232E55F9C44FE821E8BACBDFF2E94-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -2810,6 +2864,35 @@
 <!--C216C156DB954876BB6F0B830038E599-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C216C156DB954876BB6F0B830038E599--></AD_FIELD>
 
+<!--C2B8716DE89B4A69BD3F0F77667A9938--><AD_FIELD>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_FIELD_ID><![CDATA[C2B8716DE89B4A69BD3F0F77667A9938]]></AD_FIELD_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <NAME><![CDATA[Validation]]></NAME>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <DESCRIPTION><![CDATA[A validation rule that defines how an entry is determined to be valid or invalid.]]></DESCRIPTION>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <HELP><![CDATA[The Validation Rule indicates a unique validation rule.  These rules define how an entry is determined to valid or invalid.]]></HELP>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_COLUMN_ID><![CDATA[A35E96B6DAC1441D89A64BFF46E4E35F]]></AD_COLUMN_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <DISPLAYLOGIC><![CDATA[@AD_Reference_ID@='95E2A8B50A254B2AAE6774B8C2F28120' | @AD_Reference_ID@='80B1630792EA46F298A3FBF81E77EF9C']]></DISPLAYLOGIC>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--C2B8716DE89B4A69BD3F0F77667A9938-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--C2B8716DE89B4A69BD3F0F77667A9938--></AD_FIELD>
+
 <!--C5E25325FEAA4F2DBAFB4A7B443E4851--><AD_FIELD>
 <!--C5E25325FEAA4F2DBAFB4A7B443E4851-->  <AD_FIELD_ID><![CDATA[C5E25325FEAA4F2DBAFB4A7B443E4851]]></AD_FIELD_ID>
 <!--C5E25325FEAA4F2DBAFB4A7B443E4851-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3072,7 +3155,7 @@
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--CD0E9652F46441AA9A75A0A2FC467706-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--CD0E9652F46441AA9A75A0A2FC467706-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--CD0E9652F46441AA9A75A0A2FC467706-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3214,7 +3297,7 @@
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <DISPLAYLENGTH><![CDATA[1000]]></DISPLAYLENGTH>
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--DE68D30E9D454AFDA315C9A010AECF7A-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--DE68D30E9D454AFDA315C9A010AECF7A-->  <SEQNO><![CDATA[120]]></SEQNO>
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--DE68D30E9D454AFDA315C9A010AECF7A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3242,7 +3325,7 @@
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <SEQNO><![CDATA[180]]></SEQNO>
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--DEADFF4CCD7A46A2AF11410CA259FDBC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3356,7 +3439,7 @@
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--E462C2E48157429EAAA8CD1D25E5E34E-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--E462C2E48157429EAAA8CD1D25E5E34E-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--E462C2E48157429EAAA8CD1D25E5E34E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1253,6 +1253,18 @@
 <!--B8C1706AB7C34C0EA750048CD68E314A-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--B8C1706AB7C34C0EA750048CD68E314A--></AD_MESSAGE>
 
+<!--BCA6318A99B54DB5A27D319C6569316B--><AD_MESSAGE>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <AD_MESSAGE_ID><![CDATA[BCA6318A99B54DB5A27D319C6569316B]]></AD_MESSAGE_ID>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <VALUE><![CDATA[OBUIAPP_NotAddingFieldsWhileGridEditing]]></VALUE>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <MSGTEXT><![CDATA[New fields cannot be added to the grid while it is being edited.]]></MSGTEXT>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--BCA6318A99B54DB5A27D319C6569316B-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--BCA6318A99B54DB5A27D319C6569316B--></AD_MESSAGE>
+
 <!--C415C626CAE14E35A7F05C42F11DA114--><AD_MESSAGE>
 <!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_MESSAGE_ID><![CDATA[C415C626CAE14E35A7F05C42F11DA114]]></AD_MESSAGE_ID>
 <!--C415C626CAE14E35A7F05C42F11DA114-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1613,6 +1625,19 @@
 <!--F1608458F2A84B81812F0A5C8B3E8633-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--F1608458F2A84B81812F0A5C8B3E8633--></AD_MESSAGE>
 
+<!--F6836B6ADBBD43EBB08126F0E1482CD1--><AD_MESSAGE>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <AD_MESSAGE_ID><![CDATA[F6836B6ADBBD43EBB08126F0E1482CD1]]></AD_MESSAGE_ID>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <VALUE><![CDATA[OBUIAPP_SaveChangesBeforeAddRemoveNote]]></VALUE>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <MSGTEXT><![CDATA[There are changes in the current record.
+Please save or discard them before add or remove a note.]]></MSGTEXT>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--F6836B6ADBBD43EBB08126F0E1482CD1--></AD_MESSAGE>
+
 <!--FAF1675F98A248C39469E132D1B0E2DE--><AD_MESSAGE>
 <!--FAF1675F98A248C39469E132D1B0E2DE-->  <AD_MESSAGE_ID><![CDATA[FAF1675F98A248C39469E132D1B0E2DE]]></AD_MESSAGE_ID>
 <!--FAF1675F98A248C39469E132D1B0E2DE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -22,7 +22,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--9BA0836A3CD74EE4AB48753A47211BCC--></AD_MODULE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.20831]]></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-db/database/sourcedata/AD_VAL_RULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -24,6 +24,17 @@
 <!--837261709AF74F0EB9B8F41B5D6A740A-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--837261709AF74F0EB9B8F41B5D6A740A--></AD_VAL_RULE>
 
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4--><AD_VAL_RULE>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <AD_VAL_RULE_ID><![CDATA[D3CD12B927AC4A1B8FCC6FE03E194CF4]]></AD_VAL_RULE_ID>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <NAME><![CDATA[Validation type for Parameter Windows]]></NAME>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <TYPE><![CDATA[S]]></TYPE>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <CODE><![CDATA[type in ('HQL_JS')]]></CODE>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D3CD12B927AC4A1B8FCC6FE03E194CF4--></AD_VAL_RULE>
+
 <!--FF80818132F296860132F2988E6E0008--><AD_VAL_RULE>
 <!--FF80818132F296860132F2988E6E0008-->  <AD_VAL_RULE_ID><![CDATA[FF80818132F296860132F2988E6E0008]]></AD_VAL_RULE_ID>
 <!--FF80818132F296860132F2988E6E0008-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -72,6 +72,11 @@
       objCloneOrder.setUpdated(new Date());
       objCloneOrder.setCreatedBy(currentUser);
       objCloneOrder.setUpdatedBy(currentUser);
+      // Setting order date and scheduled delivery date of header and the order lines to current
+      // date to avoid issues with tax rates. Refer issue
+      // https://issues.openbravo.com/view.php?id=23671
+      objCloneOrder.setOrderDate(new Date());
+      objCloneOrder.setScheduledDeliveryDate(new Date());
 
       // save the cloned order object
       OBDal.getInstance().save(objCloneOrder);
@@ -97,6 +102,8 @@
         objCloneOrdLine.setUpdated(new Date());
         objCloneOrdLine.setCreatedBy(currentUser);
         objCloneOrdLine.setUpdatedBy(currentUser);
+        objCloneOrdLine.setOrderDate(new Date());
+        objCloneOrdLine.setScheduledDeliveryDate(new Date());
         objCloneOrder.getOrderLineList().add(objCloneOrdLine);
         objCloneOrdLine.setSalesOrder(objCloneOrder);
       }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/FieldHandler.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/FieldHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2012 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2013 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -45,7 +45,8 @@
 public class FieldHandler extends EntityPersistenceEventObserver {
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(Field.ENTITY_NAME) };
 
-  public void onUpdate(@Observes EntityUpdateEvent event) {
+  public void onUpdate(@Observes
+  EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -53,7 +54,8 @@
     setIgnoreInWad(event);
   }
 
-  public void onNew(@Observes EntityNewEvent event) {
+  public void onNew(@Observes
+  EntityNewEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -64,15 +66,16 @@
   // must be called after setcolumn
   private void setIgnoreInWad(EntityPersistenceEvent event) {
     final Column column = (Column) event.getCurrentState(getColumnProperty());
-    if (column.getSqllogic() != null) {
+    if (column != null && column.getSqllogic() != null) {
       event.setCurrentState(getIgnoreInWadProperty(), true);
     }
   }
 
   private void setColumn(EntityPersistenceEvent event) {
     final String propertyPath = (String) event.getCurrentState(getPropertyProperty());
+    final String clientClass = (String) event.getCurrentState(getClientClassProperty());
     if (propertyPath == null || propertyPath.trim().length() == 0) {
-      if (event.getCurrentState(getColumnProperty()) == null) {
+      if (event.getCurrentState(getColumnProperty()) == null && clientClass == null) {
         throw new OBException(OBMessageUtils.messageBD("OBUIAPP_ColumnMustBeSet"));
       }
       return;
@@ -113,4 +116,8 @@
   private Property getTabProperty() {
     return entities[0].getProperty(Field.PROPERTY_TAB);
   }
+
+  private Property getClientClassProperty() {
+    return entities[0].getProperty(Field.PROPERTY_CLIENTCLASS);
+  }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/NoteEventHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -0,0 +1,132 @@
+/*
+ *************************************************************************
+ * 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) 2013 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.client.application.event;
+
+import javax.enterprise.event.Observes;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.client.application.Note;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.client.kernel.event.EntityDeleteEvent;
+import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.businessUtility.Preferences;
+import org.openbravo.erpCommon.utility.PropertyException;
+import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.erpCommon.utility.WindowAccessData;
+import org.openbravo.model.ad.ui.Tab;
+import org.openbravo.service.db.DalConnectionProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Checks if the Role has access to add notes for a particular tab
+ * 
+ * @author shankar balachandran
+ */
+public class NoteEventHandler extends EntityPersistenceEventObserver {
+  private static Logger log = LoggerFactory.getLogger(NoteEventHandler.class);
+  private static Entity[] entities = { ModelProvider.getInstance().getEntity(Note.ENTITY_NAME) };
+
+  @Override
+  protected Entity[] getObservedEntities() {
+    return entities;
+  }
+
+  public void onUpdate(@Observes
+  EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    isReadOnly();
+  }
+
+  public void onNew(@Observes
+  EntityNewEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    isReadOnly();
+  }
+
+  public void onDelete(@Observes
+  EntityDeleteEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    isReadOnly();
+  }
+
+  /**
+   * Checks if the note is accessible by the role
+   */
+  private void isReadOnly() {
+    boolean isReadOnly = false;
+    String disableNotesForReadOnly = "Y", tabId = null, roleId = null, language = null;
+    ConnectionProvider connection = null;
+    try {
+      OBContext.setAdminMode();
+      try {
+        disableNotesForReadOnly = Preferences.getPreferenceValue("DisableNotesForReadOnlyTabs",
+            true, OBContext.getOBContext().getCurrentClient(), OBContext.getOBContext()
+                .getCurrentOrganization(), OBContext.getOBContext().getUser(), OBContext
+                .getOBContext().getRole(), null);
+      } catch (PropertyException e) {
+        // if property not found, do not disable notes
+        disableNotesForReadOnly = "N";
+      }
+
+      if ("Y".equals(disableNotesForReadOnly)) {
+        tabId = RequestContext.get().getRequestParameter("tabId");
+        roleId = OBContext.getOBContext().getRole().getId();
+
+        if (tabId != null) {
+          Tab tab = OBDal.getInstance().get(Tab.class, tabId);
+
+          if (tab.isReadOnly() || tab.getUIPattern().equals("RO")) {
+            isReadOnly = true;
+          } else {
+            if (roleId != null) {
+              isReadOnly = WindowAccessData.hasReadOnlyAccess(new DalConnectionProvider(false),
+                  roleId, tabId);
+            }
+
+          }
+        }
+      }
+    } catch (Exception e) {
+      log.error(e.getMessage(), e);
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+
+    if (isReadOnly) {
+      language = OBContext.getOBContext().getLanguage().getLanguage();
+      connection = new DalConnectionProvider(false);
+      throw new OBException(Utility.messageBD(connection, "NotesDisabledForReadOnlyTabs", language));
+    }
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2009-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2013 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -48,6 +48,7 @@
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.obps.ActivationKey;
 import org.openbravo.erpCommon.obps.ActivationKey.LicenseRestriction;
+import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.access.Role;
 import org.openbravo.model.ad.access.RoleOrganization;
 import org.openbravo.model.ad.access.User;
@@ -340,6 +341,15 @@
     }
 
     final Role role = OBDal.getInstance().get(Role.class, roleId);
+
+    // In case the client is deleted using 'Delete Client' and immediately accessed from the profile
+    // widget throw error. Refer https://issues.openbravo.com/view.php?id=24092
+    if (role == null || role.getClient() == null) {
+      String errorMessage = Utility.messageBD(new DalConnectionProvider(false), "ClientDeleted",
+          OBContext.getOBContext().getLanguage().getLanguage());
+      throw new OBException(errorMessage);
+    }
+
     final String clientId = role.getClient().getId();
 
     String warehouseId = getStringValue(json, "warehouse");
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,6 +25,9 @@
     type: '${param.type}',
     title: '${param.title?js_string}',
     name: '${param.name?js_string}',
+    
+  <#if param.type != "OBSectionItem">
+    paramId: '${param.id}',
     width: '${param.width?js_string}',
     <#if param.redrawOnChange>
       redrawOnChange: true,
@@ -34,7 +37,24 @@
         return (${param.showIf});
       },
     </#if>
+    <#if param.readOnlyIf != "" >
+      readOnlyIf: function(currentValues) {
+        return (${param.readOnlyIf});
+      },
+    </#if>
+    <#if param.length != -1>
+      length: ${param.length},
+    </#if>
     required: ${param.required?string}
     ${param.parameterProperties}
+  <#else>
+    defaultValue: '${param.title?js_string}',
+    sectionExpanded: ${param.expanded?string},
+    itemIds: [
+    <#list param.children as childParam>
+      '${childParam.dBColumnName?js_string}'<#if childParam_has_next>,</#if>
+    </#list>
+    ]
+  </#if>
 }
 </#macro>
\ No newline at end of file
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-window.js.ftl	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-window.js.ftl	Wed Aug 07 09:31:14 2013 +0200
@@ -48,6 +48,7 @@
       </#if>
     </#list>    
      ]
-    }
+    },
+    dynamicColumns: ${data.dynamicColumns}
 });
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -39,6 +39,10 @@
         filterName: '${data.filterName?js_string}',
     </#if>
     
+    requiredGridProperties: [
+    <#list data.requiredGridProperties as property>
+        '${property?js_string}'<#if property_has_next>,</#if>
+    </#list>],
     // the this is the view instance
     fields: this.gridFields
 })
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Wed Aug 07 09:31:14 2013 +0200
@@ -166,6 +166,7 @@
     initWidget: function() {
         this.prepareFields();
         this.dataSource = ${tabComponent.dataSourceJavaScript};
+        this.notesDataSource = ${tabComponent.notesDataSourceJavaScript};
         this.dataSource.potentiallyShared = true;
         this.viewForm = isc.OBViewForm.create(isc.clone(OB.ViewFormProperties), ${tabComponent.viewForm}); 
         this.viewGrid = ${tabComponent.viewGrid};
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/AttachmentsAH.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/AttachmentsAH.java	Wed Aug 07 09:31:14 2013 +0200
@@ -10,8 +10,8 @@
  * License for the specific  language  governing  rights  and  limitations
  * under the License. 
  * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2011 Openbravo SLU 
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011-2013 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -37,6 +37,7 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBDao;
+import org.openbravo.erpCommon.businessUtility.TabAttachments;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.utility.Attachment;
 import org.openbravo.utils.FileUtility;
@@ -79,8 +80,9 @@
   private void deleteFile(Attachment attachment) {
     String attachmentFolder = OBPropertiesProvider.getInstance().getOpenbravoProperties()
         .getProperty("attach.path");
-    String fileDirPath = attachmentFolder + "/" + DalUtil.getId(attachment.getTable()) + "-"
-        + attachment.getRecord();
+    String fileDir = TabAttachments.getAttachmentDirectory(attachment.getTable().getId(),
+        attachment.getRecord(), attachment.getName());
+    String fileDirPath = attachmentFolder + "/" + fileDir;
     FileUtility f = new FileUtility();
     final File file = new File(fileDirPath, attachment.getName());
     if (file.exists()) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Aug 07 09:31:14 2013 +0200
@@ -516,10 +516,17 @@
 
   private void setSessionAttributesFromParserResult(DynamicExpressionParser parser,
       Map<String, String> sessionAttributesMap, String windowId) {
+    String attribute = null, attrValue = null;
     for (String attrName : parser.getSessionAttributes()) {
       if (!sessionAttributesMap.containsKey(attrName)) {
-        final String attrValue = Utility.getContext(new DalConnectionProvider(false),
-            RequestContext.get().getVariablesSecureApp(), attrName, windowId);
+        if (attrName.startsWith("#")) {
+          attribute = attrName.substring(1, attrName.length());
+          attrValue = Utility.getContext(new DalConnectionProvider(false), RequestContext.get()
+              .getVariablesSecureApp(), attribute, windowId);
+        } else {
+          attrValue = Utility.getContext(new DalConnectionProvider(false), RequestContext.get()
+              .getVariablesSecureApp(), attrName, windowId);
+        }
         sessionAttributesMap.put(attrName.startsWith("#") ? attrName.replace("#", "_") : attrName,
             attrValue);
       }
@@ -814,13 +821,21 @@
     // database
     if (mode.equals("EDIT") && !dataSourceBasedTable) {
       // In EDIT mode we initialize them from the database
-      for (Field field : fields) {
-        if (field.getColumn() == null) {
-          continue;
-        }
-        setValueOfColumnInRequest(row, field, field.getColumn().getDBColumnName());
+      List<Column> columns = getADColumnList(tab.getTable().getId());
+      for (Column column : columns) {
+        setValueOfColumnInRequest(row, null, column.getDBColumnName());
       }
     }
+
+    List<String> gridVisibleProperties = new ArrayList<String>();
+    if (jsContent.has("_visibleProperties")) {
+      try {
+        gridVisibleProperties = convertJSONArray(jsContent.getJSONArray("_gridVisibleProperties"));
+      } catch (JSONException e) {
+        log.error("Error while retrieving _gridVisibleProperties from jsContent" + jsContent, e);
+      }
+    }
+
     // and then overwrite with what gets passed in
     if (mode.equals("EDIT") || mode.equals("CHANGE") || mode.equals("SETSESSION")) {
       // In CHANGE and SETSESSION we get them from the request
@@ -828,7 +843,14 @@
         if (field.getColumn() == null) {
           continue;
         }
+        // Do not overwrite the value of fields that are not visible in the grid, because they are
+        // empty in the request
+
         final Property prop = KernelUtils.getInstance().getPropertyFromColumn(field.getColumn());
+        if ((mode.equals("EDIT") || mode.equals("SETSESSION"))
+            && !gridVisibleProperties.contains(prop.getName())) {
+          continue;
+        }
         String inpColName = "inp"
             + Sqlc.TransformaNombreColumna(field.getColumn().getDBColumnName());
         try {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -73,6 +73,7 @@
 
   private List<String> windowEntities = null;
   private List<OBViewFieldDefinition> fields;
+  private List<String> propertiesInButtonFieldDisplayLogic = new ArrayList<String>();
 
   private List<Field> ignoredFields = new ArrayList<Field>();
 
@@ -94,7 +95,8 @@
   }
 
   public List<OBViewFieldDefinition> getFields() {
-
+    final Entity entity = ModelProvider.getInstance().getEntityByTableId(
+        getTab().getTable().getId());
     if (fields != null) {
       return fields;
     }
@@ -129,6 +131,13 @@
         if (!fieldsInDynamicExpression.contains(fieldExpression)) {
           fieldsInDynamicExpression.add(fieldExpression);
         }
+        if ("Button".equals(f.getColumn().getReference().getName())) {
+          Property property = entity.getPropertyByColumnName(fieldExpression.getColumn()
+              .getDBColumnName());
+          if (!propertiesInButtonFieldDisplayLogic.contains(property.getName())) {
+            propertiesInButtonFieldDisplayLogic.add(property.getName());
+          }
+        }
       }
     }
 
@@ -197,6 +206,7 @@
     OBViewFieldGroup currentFieldGroup = null;
     FieldGroup currentADFieldGroup = null;
     int colNum = 1;
+    long previousFieldRowSpan = 0, previousFieldColSpan = 0;
     for (Field field : adFields) {
 
       if ((field.getColumn() == null && field.getClientclass() == null) || !field.isActive()
@@ -214,6 +224,17 @@
 
       if (field.isStartnewline()) {
         colNum = 1;
+        // if rowspan is greater than 1 add spaces appropriately to start the field in new line
+        if (previousFieldRowSpan >= 2) {
+          final OBViewFieldSpacer spacer = new OBViewFieldSpacer();
+          for (int i = 0; i < previousFieldRowSpan; i++) {
+            // for each rowspan added, add spaces based on the colSpan. 4 is the default columns
+            // allowed in a row.
+            for (int j = 0; j < (4 - previousFieldColSpan); j++) {
+              fields.add(spacer);
+            }
+          }
+        }
       }
 
       if (field.getColumn() == null) {
@@ -257,6 +278,8 @@
         if (colNum > 4) {
           colNum = 1;
         }
+        previousFieldRowSpan = viewField.getRowSpan();
+        previousFieldColSpan = viewField.getColSpan();
       } else {
         final OBViewField viewField = new OBViewField();
 
@@ -302,6 +325,8 @@
         if (colNum > 4) {
           colNum = 1;
         }
+        previousFieldRowSpan = viewField.getRowSpan();
+        previousFieldColSpan = viewField.getColSpan();
       }
     }
 
@@ -2027,4 +2052,9 @@
     getFields(); // initializes stuff
     return ignoredFields;
   }
+
+  public List<String> getPropertiesInButtonFieldDisplayLogic() {
+    return propertiesInButtonFieldDisplayLogic;
+  }
+
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Wed Aug 07 09:31:14 2013 +0200
@@ -18,11 +18,14 @@
  */
 package org.openbravo.client.application.window;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
 import org.openbravo.client.application.window.OBViewFieldHandler.OBViewField;
 import org.openbravo.client.application.window.OBViewFieldHandler.OBViewFieldDefinition;
 import org.openbravo.client.kernel.BaseTemplateComponent;
@@ -231,4 +234,27 @@
     this.viewTab = viewTab;
   }
 
+  /**
+   * Returns the string representation of an array that contains all the properties that must always
+   * be returned from the datasource when the grid asks for data: - id - all the properties that
+   * compose the identifier of the entity - all the properties that are part of the display logic of
+   * the tab buttons
+   */
+  public List<String> getRequiredGridProperties() {
+    List<String> requiredGridProperties = new ArrayList<String>();
+    requiredGridProperties.add("id");
+
+    for (Property identifierProperty : this.entity.getIdentifierProperties()) {
+      requiredGridProperties.add(identifierProperty.getName());
+    }
+
+    List<String> propertiesInButtonFieldDisplayLogic = getViewTab().getFieldHandler()
+        .getPropertiesInButtonFieldDisplayLogic();
+
+    for (String propertyName : propertiesInButtonFieldDisplayLogic) {
+      requiredGridProperties.add(propertyName);
+    }
+
+    return requiredGridProperties;
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Wed Aug 07 09:31:14 2013 +0200
@@ -29,6 +29,7 @@
 import org.openbravo.client.application.Process;
 import org.openbravo.client.kernel.reference.UIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
+import org.openbravo.model.ad.ui.FieldGroup;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 
@@ -45,38 +46,74 @@
   public List<OBViewParameter> getParameters() {
 
     List<Parameter> parametersInExpression = new ArrayList<Parameter>();
-    Map<Parameter, String> paramToJSExpression = new HashMap<Parameter, String>();
+
     // Computes the display logic of the parameters
     // It has to be done in advance in order to determine the dynamic parameters
+    Map<Parameter, String> displayLogicMap = new HashMap<Parameter, String>();
     for (Parameter param : process.getOBUIAPPParameterList()) {
-      if (param.isActive()) {
-        if (param.getDisplayLogic() != null && !param.getDisplayLogic().isEmpty()) {
-          boolean parameterDisplayLogic = true;
-          final DynamicExpressionParser parser = new DynamicExpressionParser(
-              param.getDisplayLogic(), param.getObuiappProcess(), parameterDisplayLogic);
-          paramToJSExpression.put(param, parser.getJSExpression());
-          for (Parameter parameterExpression : parser.getParameters()) {
-            if (!parametersInExpression.contains(parameterExpression)) {
-              parametersInExpression.add(parameterExpression);
-            }
+      if (param.isActive() && param.getDisplayLogic() != null && !param.getDisplayLogic().isEmpty()) {
+        final DynamicExpressionParser parser = new DynamicExpressionParser(param.getDisplayLogic(),
+            param.getObuiappProcess(), true);
+        displayLogicMap.put(param, parser.getJSExpression());
+        for (Parameter parameterExpression : parser.getParameters()) {
+          if (!parametersInExpression.contains(parameterExpression)) {
+            parametersInExpression.add(parameterExpression);
+          }
+        }
+      }
+    }
+
+    // Computes read-only logic
+    Map<Parameter, String> readOnlyLogicMap = new HashMap<Parameter, String>();
+    for (Parameter param : process.getOBUIAPPParameterList()) {
+      if (param.isActive() && !param.isFixed() && param.getReadOnlyLogic() != null
+          && !param.getReadOnlyLogic().isEmpty()) {
+        final DynamicExpressionParser parser = new DynamicExpressionParser(
+            param.getReadOnlyLogic(), param.getObuiappProcess(), true);
+        readOnlyLogicMap.put(param, parser.getJSExpression());
+        for (Parameter parameterExpression : parser.getParameters()) {
+          if (!parametersInExpression.contains(parameterExpression)) {
+            parametersInExpression.add(parameterExpression);
           }
         }
       }
     }
 
     List<OBViewParameter> params = new ArrayList<OBViewParameterHandler.OBViewParameter>();
+    OBViewParamGroup currentGroup = null;
+    FieldGroup currentADFieldGroup = null;
     for (Parameter param : process.getOBUIAPPParameterList()) {
-      if (param.isActive()
-          && (!param.isFixed() || param.getReference().getId().equals(WINDOW_REFERENCE_ID))
-          && (!param.getReference().getId()
-              .equals(ParameterWindowComponent.BUTTON_LIST_REFERENCE_ID))) {
-        OBViewParameter parameter = new OBViewParameter(param);
-        parameter.setRedrawOnChange(parametersInExpression.contains(param));
-        if (paramToJSExpression.containsKey(param)) {
-          parameter.setShowIf(paramToJSExpression.get(param));
-        }
-        params.add(parameter);
+      if (!(param.isActive()
+          && (!param.isFixed() || param.getReference().getId().equals(WINDOW_REFERENCE_ID)) && (!param
+          .getReference().getId().equals(ParameterWindowComponent.BUTTON_LIST_REFERENCE_ID)))) {
+        continue;
       }
+
+      // change in fieldgroup
+      if (param.getFieldGroup() != null && param.getFieldGroup() != currentADFieldGroup) {
+        OBViewParamGroup group = new OBViewParamGroup();
+        params.add(group);
+        group.setFieldGroup(param.getFieldGroup());
+
+        currentGroup = group;
+        currentADFieldGroup = param.getFieldGroup();
+      }
+
+      if (currentGroup != null) {
+        currentGroup.addChild(param);
+      }
+
+      OBViewParameter parameter = new OBViewParameter(param);
+      parameter.setRedrawOnChange(parametersInExpression.contains(param));
+      if (displayLogicMap.containsKey(param)) {
+        parameter.setShowIf(displayLogicMap.get(param));
+      }
+
+      if (readOnlyLogicMap.containsKey(param)) {
+        parameter.setReadOnlyIf(readOnlyLogicMap.get(param));
+      }
+
+      params.add(parameter);
     }
     return params;
   }
@@ -85,13 +122,22 @@
     UIDefinition uiDefinition;
     Parameter parameter;
     String showIf = "";
+    String readOnlyIf = "";
     boolean redrawOnChange = false;
 
+    public OBViewParameter() {
+
+    }
+
     public OBViewParameter(Parameter param) {
       uiDefinition = UIDefinitionController.getInstance().getUIDefinition(param.getReference());
       parameter = param;
     }
 
+    public String getId() {
+      return parameter.getId();
+    }
+
     public String getType() {
       return uiDefinition != null ? uiDefinition.getName() : "--";
     }
@@ -161,6 +207,14 @@
       return showIf;
     }
 
+    public void setReadOnlyIf(String readOnlyIf) {
+      this.readOnlyIf = readOnlyIf;
+    }
+
+    public String getReadOnlyIf() {
+      return readOnlyIf;
+    }
+
     public boolean getRedrawOnChange() {
       return redrawOnChange;
     }
@@ -172,6 +226,54 @@
     public String getWidth() {
       return this.uiDefinition.getParameterWidth(this.parameter);
     }
+
+    public Long getLength() {
+      if (parameter == null || parameter.getLength() == 0L) {
+        return -1L;
+      }
+      return parameter.getLength();
+    }
+  }
+
+  public class OBViewParamGroup extends OBViewParameter {
+    private FieldGroup fieldGroup;
+    private List<Parameter> children = new ArrayList<Parameter>();
+
+    @Override
+    public String getType() {
+      return "OBSectionItem";
+    }
+
+    public void setFieldGroup(FieldGroup fieldGroup) {
+      this.fieldGroup = fieldGroup;
+    }
+
+    @Override
+    public String getName() {
+      return fieldGroup.getId();
+    }
+
+    @Override
+    public String getTitle() {
+      return OBViewUtil.getLabel(fieldGroup, fieldGroup.getADFieldGroupTrlList());
+    }
+
+    @Override
+    public boolean isGrid() {
+      return false;
+    }
+
+    public void addChild(Parameter param) {
+      children.add(param);
+    }
+
+    public List<Parameter> getChildren() {
+      return children;
+    }
+
+    public boolean isExpanded() {
+      return !(fieldGroup.isCollapsed() == null ? false : fieldGroup.isCollapsed());
+    }
   }
 
   public void setParamWindow(ParameterWindowComponent parameterWindowComponent) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Wed Aug 07 09:31:14 2013 +0200
@@ -129,6 +129,14 @@
     return component.generate();
   }
 
+  public String getNotesDataSourceJavaScript() {
+    final Map<String, Object> dsParameters = new HashMap<String, Object>(getParameters());
+    dsParameters.put(DataSourceConstants.DS_ONLY_GENERATE_CREATESTATEMENT, true);
+    final Component component = dsComponentProvider.getComponent(
+        "090A37D22E61FE94012E621729090048", dsParameters);
+    return component.generate();
+  }
+
   protected Template getComponentTemplate() {
     final String windowType = tab.getWindow().getWindowType();
     if (TEMPLATE_MAP.containsKey(windowType)) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Wed Aug 07 09:31:14 2013 +0200
@@ -19,10 +19,15 @@
 package org.openbravo.client.application.window;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.inject.Inject;
 
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.client.application.Process;
@@ -31,6 +36,9 @@
 import org.openbravo.client.kernel.Template;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.domain.Validation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The component which takes care of creating a class for a specific paramter window.
@@ -39,6 +47,7 @@
  */
 public class ParameterWindowComponent extends BaseTemplateComponent {
   private static final String DEFAULT_TEMPLATE_ID = "FF80818132F916130132F9357DE10016";
+  private static final Logger log = LoggerFactory.getLogger(ParameterWindowComponent.class);
 
   static final String BUTTON_LIST_REFERENCE_ID = "FF80818132F94B500132F9575619000A";
 
@@ -131,4 +140,84 @@
     }
     return new ArrayList<org.openbravo.model.ad.domain.List>();
   }
+
+  public String getDynamicColumns() {
+    List<Parameter> paramsWithValidation = new ArrayList<Parameter>();
+    List<String> allParams = new ArrayList<String>();
+    Map<String, List<String>> dynCols = new HashMap<String, List<String>>();
+
+    for (Parameter param : process.getOBUIAPPParameterList()) {
+      Validation validation = param.getValidation();
+      if (validation != null) {
+        if (validation.getType().equals("HQL_JS")) {
+          paramsWithValidation.add(param);
+        } else {
+          log.error("Unsupported validation type {} for param {} in process {}", new Object[] {
+              "HQL_JS", param, process });
+        }
+      }
+      allParams.add(param.getDBColumnName());
+    }
+
+    for (Parameter paramWithVal : paramsWithValidation) {
+      parseValidation(paramWithVal.getValidation(), dynCols, allParams,
+          paramWithVal.getDBColumnName());
+    }
+
+    JSONObject jsonDynCols = new JSONObject();
+
+    for (String dynColName : dynCols.keySet()) {
+      JSONArray affectedColumns = new JSONArray();
+      for (String affectedCol : dynCols.get(dynColName)) {
+        affectedColumns.put(affectedCol);
+      }
+      try {
+        jsonDynCols.put(dynColName, affectedColumns);
+      } catch (JSONException e) {
+        log.error("Error generating dynamic columns for process {}", process.getName(), e);
+      }
+    }
+    return jsonDynCols.toString();
+  }
+
+  /**
+   * Dynamic columns is a list of columns that cause others to be modified, it includes the ones
+   * causing the modification as well as the affected ones.
+   * 
+   * Columns are identified as strings surrounded by quotes (" or ') matching one of the names of
+   * the parameters.
+   */
+  private void parseValidation(Validation validation, Map<String, List<String>> dynCols,
+      List<String> allParams, String paramName) {
+    String token = validation.getValidationCode().replace("\"", "'");
+
+    List<String> columns;
+
+    int i = token.indexOf("'");
+    while (i != -1) {
+      token = token.substring(i + 1);
+      i = token.indexOf("'");
+      if (i != -1) {
+        String strAux = token.substring(0, i);
+        token = token.substring(i + 1);
+        columns = dynCols.get(token);
+
+        if (!strAux.equals(paramName) && allParams.contains(strAux)) {
+          if (dynCols.containsKey(strAux)) {
+            columns = dynCols.get(strAux);
+          } else {
+            columns = new ArrayList<String>();
+            dynCols.put(strAux, columns);
+          }
+          if (!columns.contains(paramName)) {
+            columns.add(paramName);
+          }
+        }
+      }
+      if (token.indexOf("'") != -1) {
+        token = "'" + token;
+      }
+      i = token.indexOf("'");
+    }
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Wed Aug 07 09:31:14 2013 +0200
@@ -177,9 +177,15 @@
     for (OBViewTab tabComponent : tempTabs) {
       if (tabComponent.getParentTabComponent() == null) {
         if (rootTabComponent != null) {
-          // warn for a special case, multiple root tab components
-          log.warn("Window " + window.getName() + " " + window.getId()
-              + " has more than on tab on level 0, choosing an arbitrary root tab");
+          if (tabComponent.getTab().getTabLevel() == rootTabComponent.getTab().getTabLevel()) {
+            // warn for a special case, multiple root tab components
+            log.warn("Window " + window.getName() + " " + window.getId()
+                + " has more than on tab on level 0, choosing an arbitrary root tab");
+          } else {
+            // warn for a special case, two tabs with different tab levels but same sequence number
+            log.warn("Window " + window.getName() + " " + window.getId()
+                + " two tabs with the same sequence number but different tab level");
+          }
           rootTabComponent.addChildTabComponent(tabComponent);
         } else {
           rootTabComponent = tabComponent;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js	Wed Aug 07 09:31:14 2013 +0200
@@ -560,7 +560,6 @@
   },
 
   addEvent: function (startDate, endDate, name, description, otherFields, ignoreDataChanged) {
-    var i, legend = this.multiCalendar.leftControls.getLegendValueMap();
     otherFields = otherFields || {};
 
     // solve bug that otherwise time fields are not passed in
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -91,7 +91,7 @@
   // Is used to place the focus in a tab after one of the flyouts is closed.
   tabSelected: function () {
     var appFrameWindow = this.getAppFrameWindow();
-    if (appFrameWindow && appFrameWindow.putFocusOnWindow) {
+    if (appFrameWindow && appFrameWindow.putFocusOnWindow && !appFrameWindow.OB_NoRefocusAfterTabSelection) {
       appFrameWindow.putFocusOnWindow();
     }
   },
@@ -155,8 +155,12 @@
       return this.appFrameWindow;
     }
     iframe = this.getIframeWindow();
-    this.appFrameWindow = (iframe && iframe.appFrame ? iframe.appFrame : null); // caching
-    // reference
+    try {
+      this.appFrameWindow = (iframe && iframe.appFrame ? iframe.appFrame : null); // caching reference
+    } catch (e) {
+      //To avoid cross-domain JS error (in case it exists)
+      this.appFrameWindow = null;
+    }
     return this.appFrameWindow;
   },
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Wed Aug 07 09:31:14 2013 +0200
@@ -265,12 +265,17 @@
     return ret;
   },
 
-  setValue: function () {
+  setValue: function (value) {
     var ret, dateText, newArguments = arguments;
     if (this.fixedTime && newArguments[0] && isc.isA.Date(newArguments[0])) {
       newArguments[0] = this.getDateWithNewTime(newArguments[0], this.fixedTime);
     }
 
+    //Setting the value to the textual value in case text field is changed. Fixes Issue https://issues.openbravo.com/view.php?id=22381
+    if (this.textField._textChanged && this.textField.getValue() && (this.textField.getValue() !== value)) {
+      value = OB.Utilities.Date.OBToJS(this.textField.getValue(), (this.showTime ? OB.Format.dateTime : OB.Format.date));
+    }
+
     ret = this.Super('setValue', newArguments);
 
     // If fixed time (if exists) is '24:00:00', here is the logic to show in the input the day before of the real value of the component.
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Wed Aug 07 09:31:14 2013 +0200
@@ -269,20 +269,16 @@
 
   setCriterion: function (criterion) {
     var i, value, values = [],
-        operator, operators, valueSet = false,
+        operators, valueSet = false,
         criteria = criterion ? criterion.criteria : null;
     if (criteria && criteria.length && criterion.operator === 'or') {
+      operators = isc.DataSource.getSearchOperators();
       for (i = 0; i < criteria.length; i++) {
-        operators = isc.DataSource.getSearchOperators();
         //handles case where column filter symbols are removed. Refer Issue https://issues.openbravo.com/view.php?id=23925
         if (criteria[i].operator !== "iContains" && criteria[i].operator !== "contains" && criteria[i].operator !== "regexp") {
-          for (operator in operators) {
-            if (operators.hasOwnProperty(operator)) {
-              if (operators[operator].ID === criteria[i].operator && operators[operator].symbol && criteria[i].value && criteria[i].value.indexOf(operators[operator].symbol) === -1) {
-                values.push(operators[operator].symbol + criteria[i].value);
-                valueSet = true;
-              }
-            }
+          if (operators[criteria[i].operator] && (operators[criteria[i].operator].ID === criteria[i].operator) && operators[criteria[i].operator].symbol && criteria[i].value && (criteria[i].value.indexOf(operators[criteria[i].operator].symbol) === -1)) {
+            values.push(operators[criteria[i].operator].symbol + criteria[i].value);
+            valueSet = true;
           }
         }
         if (valueSet === false) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Wed Aug 07 09:31:14 2013 +0200
@@ -433,11 +433,11 @@
 
     // Make sure the number is rounded using the number of decimal digits specified in the number typeInstance
     if (isc.isA.String(this.getValue())) {
-        value = OB.Utilities.Number.OBPlainToOBMasked(this.getValue(), this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator);
-        this.setValue(OB.Utilities.Number.OBMaskedToJS(value, this.typeInstance.decSeparator, this.typeInstance.groupSeparator));
-        if (this.form.setTextualValue) {
-            this.form.setTextualValue(this.name, value, this.typeInstance);
-        }
+      value = OB.Utilities.Number.OBPlainToOBMasked(this.getValue(), this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator);
+      this.setValue(OB.Utilities.Number.OBMaskedToJS(value, this.typeInstance.decSeparator, this.typeInstance.groupSeparator));
+      if (this.form.setTextualValue) {
+        this.form.setTextualValue(this.name, value, this.typeInstance);
+      }
     }
 
     if (this.grid && this.grid.isEditing && this.grid.isEditing()) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-richtext.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-richtext.js	Wed Aug 07 09:31:14 2013 +0200
@@ -36,6 +36,17 @@
     controlGroups: ["fontControls", "styleControls", "formatControls"],
 
     keyDown: function (event, eventInfo) {
+      var me = this;
+      if (this.parentElement && typeof this.parentElement.handleItemChange === 'function' && (isc.EH.getKey() === 'Backspace' || isc.EH.getKey() === 'Delete') && !isc.EH.altKeyDown()) {
+        var oldValue = this.getValue();
+        setTimeout(function () {
+          var newValue = me.getValue();
+          if (oldValue !== newValue) {
+            me._hasChanged = true;
+            me.parentElement.handleItemChange(me);
+          }
+        }, 100);
+      }
       var response = OB.KeyboardManager.Shortcuts.monitor('OBViewForm');
       if (response !== false) {
         response = this.Super('keyDown', arguments);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Wed Aug 07 09:31:14 2013 +0200
@@ -172,6 +172,8 @@
   showDiffText: null,
   timeLabels: null,
   maxTimeStringLength: 0,
+  _avoidHideOnBlur: false,
+  _waitingForReFocus: [],
 
   dateObjToTimeString: function (dateObj) {
     var lengthThreshold, tmpString, isPM = false,
@@ -385,6 +387,29 @@
     this.updatePosition();
     return this.Super('show', arguments);
   },
+  scrolled: function () {
+    var me = this;
+    if (isc.Browser.isIE) {
+      //To avoid a problem in IE that once the scroll is pressed, the formItem loses the focus
+      this._avoidHideOnBlur = true;
+      this._waitingForReFocus.push('dummy');
+      setTimeout(function () {
+        me.formItem.form.focus();
+      }, 10);
+      setTimeout(function () {
+        me._waitingForReFocus.pop();
+        if (me._waitingForReFocus.length === 0) {
+          me._avoidHideOnBlur = false;
+        }
+      }, 150);
+    }
+    this.Super('scrolled', arguments);
+  },
+  hide: function () {
+    if (!this._avoidHideOnBlur) {
+      return this.Super('hide', arguments);
+    }
+  },
   generateData: function () {
     var dateObj, timeGranularityInMilliSeconds, timeRef, dateArray = [];
     this.convertTimes();
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2011-2012 Openbravo SLU
+ * All portions are Copyright (C) 2011-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s): Valery Lezhebokov.
  ************************************************************************
@@ -118,6 +118,8 @@
 
   recordId: null,
 
+  view: null,
+  //Set in initWidget
   layoutMargin: 0,
 
   membersMargin: 10,
@@ -132,10 +134,57 @@
 
   noteListGrid: null,
 
+  refreshFormWithEntities: [],
+  // * Entities that will force a refresh event when a new note be added or removed
+  // * If the string 'all' is found in the array, it will refresh in all cases
+  // * Entities can be added to the list by third parties by doing: isc.OBNoteLayout.getPrototype().refreshFormWithEntities.push(theEntityName);
+  //   Where 'theEntityName' is the string with the name of the entity
+  shouldRefreshAfterAddOrRemove: function () {
+    var i;
+    for (i = 0; i < this.refreshFormWithEntities.length; i++) {
+      if (this.refreshFormWithEntities[i].toLowerCase() === 'all' || this.refreshFormWithEntities[i] === this.entity) {
+        return true;
+      }
+    }
+    return false;
+  },
+
+  addOrRemoveCancelLogic: function () {
+    if (this.shouldRefreshAfterAddOrRemove() && this.view && this.view.viewForm && this.view.viewGrid && //
+    (this.view.viewForm.hasChanged || (this.view.isEditingGrid && this.view.viewGrid.getEditForm().hasChanged))) { //
+      // If should refresh after save, and there is already changes made in the form,
+      // notice it and cancel the note save action to avoid possible collisions
+      isc.warn(OB.I18N.getLabel('OBUIAPP_SaveChangesBeforeAddRemoveNote'), function () {
+        return true;
+      }, {
+        icon: '[SKINIMG]Dialog/error.png',
+        title: OB.I18N.getLabel('OBUIAPP_Error')
+      });
+      return false;
+    } else {
+      return true;
+    }
+  },
+
+  addOrRemoveNoteCallback: function (dsResponse, data, dsRequest) {
+    if (this.shouldRefreshAfterAddOrRemove()) {
+      this.view.refresh();
+    }
+  },
+
   /**
    * Saves the note to the DB.
    */
   saveNote: function () {
+    var me = this;
+    var addNoteCallback = function (dsResponse, data, dsRequest) {
+        me.addOrRemoveNoteCallback(dsResponse, data, dsRequest);
+        };
+
+    if (!this.addOrRemoveCancelLogic()) {
+      return false;
+    }
+
     var note = this.noteDynamicForm.getField('noteOBTextAreaItem').getValue();
 
     if (!note) {
@@ -154,7 +203,7 @@
       'table': this.getForm().view.standardProperties.inpTableId,
       'record': this.getForm().view.viewGrid.getSelectedRecord().id,
       'note': note
-    });
+    }, addNoteCallback);
 
     // clean text area
     this.noteDynamicForm.getItem('noteOBTextAreaItem').clearValue();
@@ -168,13 +217,22 @@
    * Deletes the note from the DB.
    */
   deleteNote: function ( /* note id to delete */ id) {
+    var me = this;
+    var removeNoteCallback = function (dsResponse, data, dsRequest) {
+        me.addOrRemoveNoteCallback(dsResponse, data, dsRequest);
+        };
+
+    if (!this.addOrRemoveCancelLogic()) {
+      return false;
+    }
+
     var noteDS = this.getNoteDataSource();
     var noteSection = this.parentElement.noteSection;
     isc.confirm(OB.I18N.getLabel('OBUIAPP_ConfirmRemoveNote'), function (clickedOK) {
       if (clickedOK) {
         noteDS.removeData({
           'id': id
-        });
+        }, removeNoteCallback);
         noteSection.setNoteCount(noteSection.noteCount - 1);
       }
     }, {
@@ -195,6 +253,9 @@
   initWidget: function () {
     this.Super('initWidget', arguments);
 
+    var view = this.getForm().view;
+    this.view = view;
+
     var hLayout = isc.HLayout.create({
       width: '50%',
       height: '100%',
@@ -224,7 +285,7 @@
         },
         isDisabled: function () {
           this.Super('isDisabled', arguments);
-          if (OB.PropertyStore.get("DisableNotesForReadOnlyTabs", this.windowId) === 'Y' && this.layout.getForm().view.readOnly === true) {
+          if (OB.PropertyStore.get("DisableNotesForReadOnlyTabs", this.windowId) === 'Y' && view.readOnly === true) {
             this.readOnly = true;
             this.canEdit = false;
           }
@@ -310,7 +371,6 @@
           criteria.criteria = [];
         }
 
-        var view = this.layout.getForm().view;
         if (view && view.viewGrid.getSelectedRecord()) {
           criteria.criteria.push({
             fieldName: 'table',
@@ -340,7 +400,7 @@
 
         // show delete link if the note was created by
         // the current user
-        if (record.createdBy === OB.User.id) {
+        if (record && record.createdBy === OB.User.id) {
           value = value + ' <nobr><span class="OBNoteListGridDelete" ><a class="OBNoteListGridDelete" href="#" onclick="' + this.layout.ID + '.deleteNote(\'' + record.id + '\')">[ ' + OB.I18N.getLabel('OBUIAPP_delete') + ' ]</a></span></nobr>';
         }
         return value;
@@ -351,7 +411,7 @@
           return this.baseStyle;
         }
 
-        if (record.createdBy === OB.User.id) {
+        if (record && record.createdBy === OB.User.id) {
           return 'OBNoteListGridCurrentUserNoteCell';
         } else {
           return 'OBNoteListGridOtherUserNoteCell';
@@ -367,8 +427,12 @@
 
     this.addMember(this.noteListGrid);
 
-    // register note DS
-    OB.Datasource.get(this.noteDSId, this.noteListGrid, null, true);
+    // use or get DS
+    if (view.notesDataSource) {
+      this.noteListGrid.setDataSource(view.notesDataSource);
+    } else {
+      OB.Datasource.get(this.noteDSId, this.noteListGrid, null, true);
+    }
   },
 
   /**
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Aug 07 09:31:14 2013 +0200
@@ -567,7 +567,9 @@
     var parentId = this.view.getParentId(),
         i, fldNames = [],
         requestParams, allProperties, parentColumn, me = this,
-        mode, length = this.getFields().length;
+        mode, length = this.getFields().length,
+        gridVisibleProperties = [],
+        len;
 
     this.setParentDisplayInfo();
 
@@ -593,6 +595,18 @@
       requestParams[parentColumn] = parentId;
     }
 
+    if (this.view && this.view.viewGrid && this.view.viewGrid.fields) {
+      gridVisibleProperties.push('id');
+      len = this.view.viewGrid.fields.length;
+      for (i = 0; i < len; i++) {
+        if (this.view.viewGrid.fields[i].name[0] !== '_') {
+          gridVisibleProperties.push(this.view.viewGrid.fields[i].name);
+        }
+      }
+      allProperties._gridVisibleProperties = gridVisibleProperties;
+    }
+
+
     allProperties._entityName = this.view.entity;
 
     // only put the visible field names in the call
@@ -1413,6 +1427,12 @@
 
   // always let the saveRow callback handle the error
   saveEditorReply: function (response, data, request) {
+    var form, isNewRecord;
+    form = request.editor.view.isShowingForm ? request.editor.view.viewForm : request.editor.view.viewGrid.getEditForm();
+    isNewRecord = form === null ? false : form.isNew;
+    if (request.editor && request.editor.view && isNewRecord) {
+      delete request.editor.view._savingNewRecord;
+    }
     return true;
   },
 
@@ -1955,4 +1975,4 @@
     }
     return true;
   }
-};
\ No newline at end of file
+};
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Aug 07 09:31:14 2013 +0200
@@ -711,7 +711,8 @@
         dsURL = this.dataSource.dataURL;
     var sortCriteria;
     var lcriteria = this.getCriteria();
-    var gdata = this.getData();
+    var gdata = this.getData(),
+        isExporting = true;
     if (gdata && gdata.dataSource) {
       lcriteria = gdata.dataSource.convertRelativeDates(lcriteria);
     }
@@ -728,7 +729,7 @@
       exportToFile: true,
       _textMatchStyle: 'substring',
       _UTCOffsetMiliseconds: OB.Utilities.Date.getUTCOffsetInMiliseconds()
-    }, lcriteria, this.getFetchRequestParams());
+    }, lcriteria, this.getFetchRequestParams(null, isExporting));
     if (this.getSortField()) {
       sortCriteria = this.getSort();
       if (sortCriteria && sortCriteria.length > 0) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Aug 07 09:31:14 2013 +0200
@@ -964,12 +964,19 @@
 
   showField: function (field, suppressRelayout) {
     var res;
+    // Do not allow to add a new field while the grid is being edited. Adding a new field implies a grid refresh, 
+    // and the refresh toolbar button is disabled while the grid/form is being edited
+    if (this.view.isEditingGrid) {
+      this.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, OB.I18N.getLabel('OBUIAPP_Error'), OB.I18N.getLabel('OBUIAPP_NotAddingFieldsWhileGridEditing'));
+      return;
+    }
     this._showingField = true;
     this._savedEditValues = this.getEditValues(this.getEditRow());
     res = this.Super('showField', arguments);
     delete this._savedEditValues;
     delete this._showingField;
     this.view.standardWindow.storeViewState();
+    this.invalidateCache();
     this.refreshContents();
     return res;
   },
@@ -1459,7 +1466,13 @@
     this.resetEmptyMessage();
     this.view.updateTabTitle();
 
-    delete this.initialCriteria;
+    /*
+     * In case the url contains advanced criteria, the initial criteria contains the criteria to be applied. So it should not be deleted.
+     * Refer issue https://issues.openbravo.com/view.php?id=23333
+     */
+    if (this.view.standardWindow.additionalCriteriaTabId !== this.view.tabId) {
+      delete this.initialCriteria;
+    }
 
     // do not refresh if the parent is not selected and we have no data
     // anyway
@@ -1593,7 +1606,20 @@
 
   refreshGrid: function (callback, newRecordsToBeIncluded) {
     var originalCriteria, criteria = {},
-        newRecordsCriteria, newRecordsLength, i;
+        newRecordsCriteria, newRecordsLength, i, index;
+
+    //check whether newRecordsToBeIncluded contains records not part of the current grid and remove them.
+    if (newRecordsToBeIncluded && newRecordsToBeIncluded.length > 0 && this.data) {
+      for (i = 0; i < newRecordsToBeIncluded.length; i++) {
+        if (!this.data.findByKey(newRecordsToBeIncluded[i])) {
+          index = newRecordsToBeIncluded.indexOf(newRecordsToBeIncluded[i]);
+          if (index !== -1) {
+            newRecordsToBeIncluded.splice(index, 1);
+          }
+        }
+      }
+    }
+
     if (this.getSelectedRecord()) {
       this.targetRecordId = this.getSelectedRecord()[OB.Constants.ID];
       // as the record is already selected it is already in the filter
@@ -1930,7 +1956,8 @@
     requestProperties.params = this.getFetchRequestParams(requestProperties.params);
   },
 
-  getFetchRequestParams: function (params) {
+  getFetchRequestParams: function (params, isExporting) {
+    var i, len, first, selectedProperties;
     params = params || {};
 
     if (this.targetRecordId) {
@@ -1974,6 +2001,29 @@
     } else {
       params[OB.Constants.WHERE_PARAMETER] = null;
     }
+
+    if (!isExporting) {
+      first = true;
+      selectedProperties = '';
+      len = this.requiredGridProperties.length;
+      for (i = 0; i < len; i++) {
+        if (first) {
+          first = false;
+          selectedProperties = selectedProperties + this.requiredGridProperties[i];
+        } else {
+          selectedProperties = selectedProperties + ',' + this.requiredGridProperties[i];
+        }
+      }
+
+      len = this.fields.length;
+      for (i = 0; i < len; i++) {
+        if (this.fields[i].name[0] !== '_') {
+          selectedProperties = selectedProperties + ',';
+          selectedProperties = selectedProperties + this.fields[i].name;
+        }
+      }
+      params._selectedProperties = selectedProperties;
+    }
     return params;
   },
 
@@ -2580,7 +2630,7 @@
     this.createNewRecordForEditing(insertRow);
     this.startEditing(insertRow);
     this.recomputeCanvasComponents(insertRow);
-    this.view.refreshChildViews();
+    this.view.initChildViewsForNewRecord();
   },
 
   initializeEditValues: function (rowNum, colNum) {
@@ -2664,7 +2714,7 @@
   editComplete: function (rowNum, colNum, newValues, oldValues, editCompletionEvent, dsResponse) {
 
     var record = this.getRecord(rowNum),
-        editRow, editSession, autoSaveAction, keepSelection;
+        editRow, editSession, autoSaveAction, keepSelection, form, isNewRecord;
 
     // this happens when the record change causes a group name
     // change and therefore a group collapse
@@ -2678,6 +2728,12 @@
       delete record._newId;
     }
 
+    form = this.getEditForm();
+    isNewRecord = (form === null) ? false : form.isNew;
+    if (isNewRecord) {
+      delete this.view._savingNewRecord;
+    }
+
     // during save the record looses the link to the editColumnLayout,
     // restore it
     if (oldValues.editColumnLayout && !record.editColumnLayout) {
@@ -3476,19 +3532,50 @@
   },
 
   getFieldFromColumnName: function (columnName) {
-    var i, field, length, fields = this.completeFields;
+    var i, field, length, fields = this.view.propertyToColumns;
 
     length = fields.length;
 
     for (i = 0; i < fields.length; i++) {
-      if (fields[i].columnName === columnName) {
+      if (fields[i].dbColumn === columnName) {
         field = fields[i];
         break;
       }
     }
     return field;
+  },
+
+  processColumnValue: function (rowNum, columnName, columnValue) {
+    var field, newValue;
+    if (!columnValue) {
+      return;
+    }
+    field = this.getFieldFromColumnName(columnName);
+    if (!field) {
+      return;
+    }
+    newValue = {};
+    newValue[field.property] = columnValue.value;
+    this.setEditValue(rowNum, field.property, columnValue.value);
+  },
+
+  processFICReturn: function (response, data, request) {
+    var context = response && response.clientContext,
+        rowNum = context && context.rowNum,
+        grid = context && context.grid,
+        columnValues, prop, value, undef;
+
+    if (rowNum === undef || !data || !data.columnValues) {
+      return;
+    }
+    columnValues = data.columnValues;
+
+    for (prop in columnValues) {
+      if (columnValues.hasOwnProperty(prop)) {
+        grid.processColumnValue(rowNum, prop, columnValues[prop]);
+      }
+    }
   }
-
 });
 
 // = OBGridToolStripIcon =
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2011-2012 Openbravo SLU
+ * All portions are Copyright (C) 2011-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -72,7 +72,7 @@
   },
 
   performDSOperation: function (operationType, data, callback, requestProperties) {
-    var currentRecord;
+    var currentRecord, isNewRecord;
 
     requestProperties = requestProperties || {};
     requestProperties.clientContext = requestProperties.clientContext || {};
@@ -120,7 +120,23 @@
     if (!newRequestProperties.dataSource) {
       newRequestProperties.dataSource = this;
     }
-    this.Super('performDSOperation', [operationType, data, callback, newRequestProperties]);
+    isNewRecord = false;
+    if (this.view.isShowingForm) {
+      isNewRecord = this.view.viewForm.isNew;
+    } else {
+      if (this.view.viewGrid.getEditForm()) {
+        isNewRecord = this.view.viewGrid.getEditForm().isNew;
+      } else {
+        isNewRecord = false;
+      }
+    }
+    // Do not save a new record if it is already being saved
+    if (!this.view._savingNewRecord || !isNewRecord) {
+      if (isNewRecord) {
+        this.view._savingNewRecord = true;
+      }
+      this.Super('performDSOperation', [operationType, data, callback, newRequestProperties]);
+    }
   },
 
   getAdditionalProps: function () {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Aug 07 09:31:14 2013 +0200
@@ -969,6 +969,22 @@
     }
   },
 
+  /**
+   * Empties the data of the child tabs and shows emptyMessage
+   */
+  initChildViewsForNewRecord: function () {
+    var i, length, tabViewPane;
+
+    if (this.childTabSet) {
+      length = this.childTabSet.tabs.length;
+      for (i = 0; i < length; i++) {
+        tabViewPane = this.childTabSet.tabs[i].pane;
+        tabViewPane.viewGrid.setData([]);
+        tabViewPane.viewGrid.resetEmptyMessage();
+      }
+    }
+  },
+
   refreshMeAndMyChildViewsWithEntity: function (entity, excludedTabIds) {
     var i, length, tabViewPane, excludeTab = false;
     if (entity && excludedTabIds) {
@@ -1117,7 +1133,7 @@
 
     if (!record) { //  new case
       this.viewGrid.deselectAllRecords();
-      this.refreshChildViews();
+      this.initChildViewsForNewRecord();
       this.viewForm.editNewRecord(preventFocus);
     } else {
       this.viewGrid.doSelectSingleRecord(record);
@@ -1302,6 +1318,10 @@
     var tabViewPane = null,
         i;
 
+    // Do not try to refresh the child tabs of a new record
+    if (this.viewGrid.getEditForm() && this.viewGrid.getEditForm().isNew) {
+      return;
+    }
     // refresh the tabs
     if (this.childTabSet && (differentRecordId || !this.isOpenDirectModeParent)) {
       length = this.childTabSet.tabs.length;
@@ -2131,6 +2151,7 @@
   },
 
   setContextInfo: function (sessionProperties, callbackFunction, forced) {
+    var newCallback, me = this;
     // no need to set the context in this case
     if (!forced && (this.isEditingGrid || this.isShowingForm)) {
       if (callbackFunction) {
@@ -2143,12 +2164,23 @@
       sessionProperties = this.getContextInfo(true, true, false, true);
     }
 
+    newCallback = function (response, data, request) {
+      var context = {}, grid = me.viewGrid;
+      context.rowNum = grid.getRecordIndex(grid.getSelectedRecord());
+      context.grid = grid;
+      response.clientContext = context;
+      grid.processFICReturn (response, data, request);
+      if (callbackFunction) {
+        callbackFunction();
+      }
+    };
+
     OB.RemoteCallManager.call('org.openbravo.client.application.window.FormInitializationComponent', sessionProperties, {
-      MODE: 'SETSESSION',
+      MODE: 'EDIT',
       TAB_ID: this.tabId,
       PARENT_ID: this.getParentId(),
       ROW_ID: this.viewGrid.getSelectedRecord() ? this.viewGrid.getSelectedRecord().id : this.getCurrentValues().id
-    }, callbackFunction);
+    }, newCallback);
 
   },
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Wed Aug 07 09:31:14 2013 +0200
@@ -103,13 +103,6 @@
       click: actionClick
     });
 
-    cancelButton = isc.OBFormButton.create({
-      title: OB.I18N.getLabel('OBUISC_Dialog.CANCEL_BUTTON_TITLE'),
-      realTitle: '',
-      click: function () {
-        view.closeClick();
-      }
-    });
     if (this.popup) {
       buttonLayout.push(isc.LayoutSpacer.create({}));
     }
@@ -146,6 +139,13 @@
     }
 
     if (this.popup) {
+      cancelButton = isc.OBFormButton.create({
+        title: OB.I18N.getLabel('OBUISC_Dialog.CANCEL_BUTTON_TITLE'),
+        realTitle: '',
+        click: function () {
+          view.closeClick();
+        }
+      });
       buttonLayout.push(cancelButton);
       buttonLayout.push(isc.LayoutSpacer.create({}));
       OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.button.cancel', cancelButton);
@@ -209,6 +209,7 @@
       if (items.length !== 0) {
         // create form if there items to include
         this.theForm = isc.DynamicForm.create({
+          paramWindow: this,
           width: '99%',
           titleSuffix: '',
           requiredTitleSuffix: '',
@@ -216,7 +217,25 @@
           titleOrientation: 'top',
           numCols: 4,
           showErrorIcons: false,
-          colWidths: ['*', '*', '*', '*']
+          colWidths: ['*', '*', '*', '*'],
+          itemChanged: function (item, newValue) {
+            var affectedParams, i, field;
+
+            this.paramWindow.handleReadOnlyLogic();
+
+            // Check validation rules (subordinated fields), when value of a
+            // parent field is changed, all its subordinated are reset
+            affectedParams = this.paramWindow.dynamicColumns[item.name];
+            if (!affectedParams) {
+              return;
+            }
+            for (i = 0; i < affectedParams.length; i++) {
+              field = this.getField(affectedParams[i]);
+              if (field && field.setValue) {
+                field.setValue(null);
+              }
+            }
+          }
         });
 
         this.theForm.setItems(items);
@@ -430,7 +449,7 @@
 
       len = (allRows && allRows.length) || 0;
       // Only send _allRows if all rows are cached
-      if (len <= grid.data.cachedRows) {
+      if (!(grid.data.resultSize) || (len < grid.data.resultSize)) {
         for (i = 0; i < len; i++) {
           tmp = isc.addProperties({}, allRows[i], grid.getEditedRecord(grid.getRecordIndex(allRows[i])));
           allProperties._allRows.push(tmp);
@@ -440,13 +459,7 @@
 
     allProperties._buttonValue = btnValue || 'DONE';
 
-    allProperties._params = {};
-    if (this.theForm && this.theForm.getItems) {
-      params = this.theForm.getItems();
-      for (i = 0; i < params.length; i++) {
-        allProperties._params[params[i].name] = params[i].getValue();
-      }
-    }
+    allProperties._params = this.getContextInfo();
 
     OB.RemoteCallManager.call(this.actionHandler, allProperties, {
       processId: this.processId,
@@ -479,7 +492,45 @@
         }
       }
     }
+
+    this.handleReadOnlyLogic();
+
     // redraw to execute display logic
     this.theForm.markForRedraw();
+  },
+
+  // Checks params with readonly logic enabling or disabling them based on it
+  handleReadOnlyLogic: function () {
+    var form, fields, i, field;
+
+    form = this.theForm;
+    if (!form) {
+      return;
+    }
+
+    fields = form.getFields();
+    for (i = 0; i < fields.length; i++) {
+      field = form.getField(i);
+      if (field.readOnlyIf && field.setDisabled) {
+        field.setDisabled(field.readOnlyIf(form.getValues()));
+      }
+    }
+  },
+
+  getContextInfo: function () {
+    var result = {},
+        params, i;
+    if (!this.theForm) {
+      return result;
+    }
+
+    if (this.theForm && this.theForm.getItems) {
+      params = this.theForm.getItems();
+      for (i = 0; i < params.length; i++) {
+        result[params[i].name] = params[i].getValue();
+      }
+    }
+
+    return result;
   }
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Aug 07 09:31:14 2013 +0200
@@ -502,6 +502,18 @@
         this.setDisabled(disabled);
       },
       keyboardShortcutId: 'ToolBar_Email'
+    },
+    'tree': {
+      updateState: function () {
+        var view = this.view,
+            grid = view.viewGrid;
+        var selectedRecords = grid.getSelectedRecords();
+        var disabled = false;
+        if (selectedRecords && selectedRecords.length === 0) {
+          disabled = true;
+        }
+        this.setDisabled(disabled);
+      }
     }
   },
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Wed Aug 07 09:31:14 2013 +0200
@@ -219,7 +219,7 @@
 // Adds the Required suffix to a base style for a required formitem, to show it yellow in 
 // the forms.
 OB.Utilities.addRequiredSuffixToBaseStyle = function (item) {
-  if (item.required) {
+  if (item && item.required) {
     // apparently this is called many times therefore do not append
     // if we already did append it
     if (item.textFieldProperties && item.textFieldProperties.textBoxStyle) {
@@ -238,7 +238,11 @@
 // ** {{{OB.Utilities.determineViewOfFormItem}}} **
 // Handles the different ways to find the view of a form item.
 OB.Utilities.determineViewOfFormItem = function (item) {
-  var form = item.form;
+  var form;
+  if (!item) {
+    return null;
+  }
+  form = item.form;
   if (form.view) {
     // form item in standard form
     return form.view;
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.20831]]></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>
@@ -21,7 +21,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--D393BE6F22BB44B7B728259B34FC795A--></AD_MODULE>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.20831]]></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_DATASET_TABLE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_DATASET_TABLE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -9,7 +9,7 @@
 <!--350EC4B124444F7D9A8E1C593B39BE18-->  <AD_TABLE_ID><![CDATA[558721361A024C3D8156095BD7C2716D]]></AD_TABLE_ID>
 <!--350EC4B124444F7D9A8E1C593B39BE18-->  <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS>
 <!--350EC4B124444F7D9A8E1C593B39BE18-->  <WHERECLAUSE><![CDATA[ad_reference_id in (select ad_reference_id from ad_reference where ad_module_id in (:moduleid))]]></WHERECLAUSE>
-<!--350EC4B124444F7D9A8E1C593B39BE18-->  <EXCLUDEAUDITINFO><![CDATA[N]]></EXCLUDEAUDITINFO>
+<!--350EC4B124444F7D9A8E1C593B39BE18-->  <EXCLUDEAUDITINFO><![CDATA[Y]]></EXCLUDEAUDITINFO>
 <!--350EC4B124444F7D9A8E1C593B39BE18-->  <ISBUSINESSOBJECT><![CDATA[N]]></ISBUSINESSOBJECT>
 <!--350EC4B124444F7D9A8E1C593B39BE18-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--350EC4B124444F7D9A8E1C593B39BE18--></AD_DATASET_TABLE>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -22,7 +22,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <UPDATEINFO><![CDATA[Bug fix for issue 15289]]></UPDATEINFO>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--4B828F4D03264080AA1D2057B13F613C--></AD_MODULE>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.20831]]></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.20523]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.20831]]></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.myob/src-db/database/model/modifiedTables/OBUIAPP_PARAMETER.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/model/modifiedTables/OBUIAPP_PARAMETER.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -8,5 +8,8 @@
       <foreign-key foreignTable="OBKMO_WIDGET_CLASS" name="EM_OBKMO_PARAMETER_WIDGETCLASS" onDelete="cascade">
         <reference local="EM_OBKMO_WIDGET_CLASS_ID" foreign="OBKMO_WIDGET_CLASS_ID"/>
       </foreign-key>
+      <index name="EM_OBKMO_PARAM_WIDGET" unique="false">
+        <index-column name="EM_OBKMO_WIDGET_CLASS_ID"/>
+      </index>
     </table>
   </database>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -23,7 +23,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <REFERENCEDATAINFO><![CDATA[Provides the infrastructure of workspace tab]]></REFERENCEDATAINFO>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2758CD25B2704AF6BBAD10365FC82C06--></AD_MODULE>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.20831]]></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>
@@ -21,7 +21,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC--></AD_MODULE>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.20831]]></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>
@@ -22,7 +22,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080812D842086012D844F3CC0003E-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--FF8080812D842086012D844F3CC0003E-->  <UPDATEINFO><![CDATA[Added Currency Converter. Added Google Docs]]></UPDATEINFO>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080812D842086012D844F3CC0003E--></AD_MODULE>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.20831]]></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.client.widgets/web/org.openbravo.client.widgets/twitter.html	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.client.widgets/web/org.openbravo.client.widgets/twitter.html	Wed Aug 07 09:31:14 2013 +0200
@@ -11,90 +11,33 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 <html>
 <body>
-<script src="//widgets.twimg.com/j/2/widget.js"></script>
 <script>
-(function() {
-
-  function getUrlVars() {
+function getUrlVars() {
     var vars = [], hash, href= window.location.href,
         hashes = href.slice(href.indexOf('?') + 1).split('&');
 
     for(var i = 0; i < hashes.length; i++) {
       hash = hashes[i].split('=');
-	  vars.push(hash[0]);
-	  vars[hash[0]] = hash[1];
+      vars.push(hash[0]);
+      vars[hash[0]] = hash[1];
     }
 
     return vars;
-  }
-
-var vars = getUrlVars(),
-    u = vars['u'] || 'Openbravo',
-    s = vars['s'] || 'Openbravo',
-    t = vars['t'] || 'profile',
-    theme = {
-        shell: {
-          background: '#dfdfdf',
-          color: '#000000'
-        },
-        tweets: {
-          background: '#58A618',
-          color: '#ffffff',
-          links: '#fff133'
-        }
-      };
-
-if(t === 'profile') {
-  new TWTR.Widget({
-    version: 2,
-    type: t,
-    rpp: 4,
-    interval: 6000,
-    width: 'auto',
-    height: 160,
-    theme: theme,
-    features: {
-      scrollbar: false,
-      fullscreen: false,
-      loop: true,
-      live: true,
-      hashtags: true,
-      timestamp: true,
-      avatars: false,
-      behavior: 'all'
-    }
-  }).render().setUser(u).start();
-  return;
 }
-new TWTR.Widget({
-  version: 2,
-  type: 'search',
-  search: s,
-  interval: 6000,
-  title: '',
-  subject: 'Tweets including "' + s + '"',
-  width: 'auto',
-  height: 200,
-  theme: theme,
-  features: {
-    scrollbar: false,
-	loop: true,
-	live: true,
-	hashtags: true,
-	timestamp: true,
-	avatars: true,
-	toptweets: true,
-	behavior: 'default'
-  }
-}).render().start();
-}())
-</script>
+var user=getUrlVars()["u"];
+if(user && user==="Openbravo_spa"){
+  document.write("<a class='twitter-timeline' href='https://twitter.com/Openbravo_Spa' data-widget-id='346960442435964928' data-chrome='noscrollbar' data-link-color='#58A618'>Tweets by @Openbravo_Spa</a>");
+}
+else {
+  document.write("<a class='twitter-timeline'  href='https://twitter.com/Openbravo'  data-widget-id='346955484378566657' data-chrome='noscrollbar' data-link-color='#58A618'>Tweets by @Openbravo</a>");
+}
+!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
 </body>
 </html>
\ No newline at end of file
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.20831]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
@@ -22,7 +22,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2A5EE903D7974AC298C0504FBC4501A7--></AD_MODULE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.20831]]></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/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Wed Aug 07 09:31:14 2013 +0200
@@ -53,6 +53,11 @@
       </script>
 <script language="JavaScript" type="text/javascript">
 
+// prevent refocus after the tab containing this window
+// gets selected, this prevents change of scroll position
+// for that tab
+OB_NoRefocusAfterTabSelection = true;
+
 function printPDF()
 {
     initialize_MessageBox('messageBoxID');
@@ -72,6 +77,8 @@
 </script>
 <script language="JavaScript" type="text/javascript">
 
+
+
 function onloadFunctions() {
  //keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/BusinessPartner.html', null, false, 'frmMain', 'inpcBPartnerId', 'inpBpartnerId_DES', inputValue(document.frmMain.inpBpartnerId_DES), 'inpIDValue', inputValue(document.frmMain.inpcBPartnerId), 'Command', 'KEY');", "inpBpartnerId_DES", "null");
 }
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Wed Aug 07 09:31:14 2013 +0200
@@ -691,7 +691,7 @@
 			<line>
 				<reportElement key="line-1" style="Report_Footer" stretchType="RelativeToBandHeight" x="0" y="0" width="1" height="25"/>
 			</line>
-			<textField isBlankWhenNull="false">
+			<textField isBlankWhenNull="true">
 				<reportElement key="textField-2" style="Report_Footer" x="2" y="0" width="98" height="25"/>
 				<box leftPadding="2"/>
 				<textElement>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.20831]]></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>
@@ -19,7 +19,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--3A3A943684D64DEF9EC39F588A656848--></AD_MODULE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -22,7 +22,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--></AD_MODULE>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.20831]]></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.20523]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.20831]]></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.20523]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.20831]]></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.
@@ -18,7 +18,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813129ADA401312CA1222A0005-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813129ADA401312CA1222A0005--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.20831]]></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.20523]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.20831]]></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.
@@ -19,7 +19,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813141B198013141B86DD70003-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080813141B198013141B86DD70003-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813141B198013141B86DD70003--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.20831]]></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>
@@ -22,7 +22,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1--></AD_MODULE>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.20831]]></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/DataToJsonConverter.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java	Wed Aug 07 09:31:14 2013 +0200
@@ -41,6 +41,8 @@
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Is responsible for converting Openbravo business objects ({@link BaseOBObject} to a json
@@ -73,6 +75,8 @@
   // limit the json serialization to these properties
   private List<String> selectedProperties = new ArrayList<String>();
 
+  private static final Logger log = LoggerFactory.getLogger(DataToJsonConverter.class);
+
   /**
    * Convert a list of Maps with key value pairs to a list of {@link JSONObject}.
    * 
@@ -260,12 +264,21 @@
 
       Property displayColumnProperty = DalUtil.getPropertyFromPath(referencedProperty.getEntity(),
           referencingProperty.getDisplayPropertyName());
-      if (displayColumnProperty.hasDisplayColumn()) {
+      if (referencingProperty.hasDisplayColumn()) {
+        String identifier = obObject.get(referencingProperty.getDisplayPropertyName()).toString();
+        if (referencingProperty.isDisplayValue()) {
+          if (obObject.getEntity().hasProperty("searchKey")) {
+            String value = (String) obObject.get("searchKey");
+            identifier = value + " - " + identifier;
+          } else {
+            log.warn("Entity "
+                + obObject.getEntity().getName()
+                + " does not have a searchKey property, the flag Displayed Value should not be used");
+          }
+        }
         // Allowing one level deep of displayed column pointing to references with display column
         jsonObject.put(propertyName.replace(DalUtil.DOT, DalUtil.FIELDSEPARATOR)
-            + DalUtil.FIELDSEPARATOR + JsonConstants.IDENTIFIER, ((BaseOBObject) obObject
-            .get(referencingProperty.getDisplayPropertyName())).get(displayColumnProperty
-            .getDisplayPropertyName()));
+            + DalUtil.FIELDSEPARATOR + JsonConstants.IDENTIFIER, identifier);
       } else if (!displayColumnProperty.isPrimitive()) {
         // Displaying identifier for non primitive properties
         jsonObject.put(propertyName.replace(DalUtil.DOT, DalUtil.FIELDSEPARATOR)
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -22,7 +22,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--5EB4F15C80684ACA904756BDC12ADBE5--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.20831]]></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.20523]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.20831]]></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.20523]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.20831]]></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/src/org/openbravo/userinterface/selector/SelectorConstants.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorConstants.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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) 2009-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2013 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -42,4 +42,6 @@
   // SelectorDataSourceFilter constants
   public static final String DS_REQUEST_SELECTOR_ID_PARAMETER = "_selectorDefinitionId";
   public static final String DS_REQUEST_TYPE_PARAMETER = "_requestType";
+  public static final String DS_REQUEST_PROCESS_DEFINITION_ID = "_processDefinitionId";
+  public static final String DS_REQUEST_SELECTOR_FIELD_ID = "_selectorFieldId";
 }
--- a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java	Wed Aug 07 09:31:14 2013 +0200
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,12 +28,14 @@
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
+import org.openbravo.client.application.Parameter;
 import org.openbravo.client.application.ParameterUtils;
 import org.openbravo.client.kernel.reference.StringUIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinition;
@@ -42,6 +44,7 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.domain.Validation;
 import org.openbravo.service.datasource.DataSourceFilter;
 import org.openbravo.service.json.JsonConstants;
 import org.openbravo.service.json.JsonUtils;
@@ -65,11 +68,9 @@
 
   @Override
   public void doFilter(Map<String, String> parameters, HttpServletRequest request) {
-
     final long t1 = System.currentTimeMillis();
 
     try {
-
       OBContext.setAdminMode();
 
       String selectorId = parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_ID_PARAMETER);
@@ -81,20 +82,56 @@
 
       Selector sel = OBDal.getInstance().get(Selector.class, selectorId);
 
-      OBCriteria<SelectorField> sfc = OBDal.getInstance().createCriteria(SelectorField.class);
-      sfc.add(Restrictions.isNotNull(SelectorField.PROPERTY_DEFAULTEXPRESSION));
-      sfc.add(Restrictions.eq(SelectorField.PROPERTY_OBUISELSELECTOR, sel));
+      String filterExpression = sel.getFilterExpression() == null ? "" : sel.getFilterExpression();
+      String filterHQL = "";
 
-      if ((sel.getFilterExpression() == null || sel.getFilterExpression().equals(""))
-          && sfc.count() == 0) { // Nothing to filter
-        return;
+      filterHQL = applyFilterExpression(filterExpression, sel, parameters, request);
+
+      String processId = parameters.get(SelectorConstants.DS_REQUEST_PROCESS_DEFINITION_ID);
+      if (!StringUtils.isEmpty(processId)) {
+        OBCriteria<Parameter> qParam = OBDal.getInstance().createCriteria(Parameter.class);
+        qParam.add(Restrictions.eq(Parameter.PROPERTY_ID,
+            parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_FIELD_ID)));
+        Parameter param = qParam.list().get(0);
+        Validation validation = qParam.list().get(0).getValidation();
+        if (validation != null) {
+          if (validation.getType().equals("HQL_JS")) {
+            String validationCode = qParam.list().get(0).getValidation().getValidationCode();
+            String validationHQL = applyFilterExpression(validationCode, sel, parameters, request);
+
+            if (!StringUtils.isEmpty(validationHQL)) {
+              if (StringUtils.isEmpty(filterHQL)) {
+                filterHQL = validationHQL;
+              } else {
+                filterHQL = "(" + filterHQL + ") and (" + validationHQL + ")";
+              }
+            }
+          } else {
+            log.error("Unsupported validation type '" + validation.getType() + "' in "
+                + param.getObuiappProcess().getName() + "->" + param.getName()
+                + ". Only 'HQL_JS' type is supported. No validation is applied!!!");
+          }
+        }
       }
 
-      // Applying filter expression
-      applyFilterExpression(sel, parameters, request);
+      if (!StringUtils.isEmpty(filterHQL)) {
+        log.debug("Adding to where clause (based on filter expression): " + filterHQL);
+
+        String currentWhere = parameters.get(JsonConstants.WHERE_PARAMETER);
+
+        if (currentWhere == null || currentWhere.equals("null") || currentWhere.equals("")) {
+          parameters.put(JsonConstants.WHERE_PARAMETER, filterHQL);
+        } else {
+          parameters.put(JsonConstants.WHERE_PARAMETER, currentWhere + " and " + filterHQL);
+        }
+      }
 
       // Applying default expression for selector fields when is not a selector window request
       if (!"Window".equals(requestType)) {
+        OBCriteria<SelectorField> sfc = OBDal.getInstance().createCriteria(SelectorField.class);
+        sfc.add(Restrictions.isNotNull(SelectorField.PROPERTY_DEFAULTEXPRESSION));
+        sfc.add(Restrictions.eq(SelectorField.PROPERTY_OBUISELSELECTOR, sel));
+
         applyDefaultExpressions(sel, parameters, sfc, request);
         verifyPropertyTypes(sel, parameters);
       }
@@ -206,11 +243,11 @@
   /**
    * Evaluates the Selector filter expression and modifies the parameters map for data filtering
    */
-  private void applyFilterExpression(Selector sel, Map<String, String> parameters,
-      HttpServletRequest request) {
+  private String applyFilterExpression(String filterExpression, Selector sel,
+      Map<String, String> parameters, HttpServletRequest request) {
 
-    if (sel.getFilterExpression() == null) {
-      return;
+    if (StringUtils.isEmpty(filterExpression)) {
+      return "";
     }
 
     Object result = null;
@@ -218,7 +255,7 @@
 
     try {
       result = ParameterUtils.getJSExpressionResult(parameters, request.getSession(),
-          sel.getFilterExpression());
+          filterExpression);
       if (result != null && !result.toString().equals("")) {
         dynamicWhere = result.toString();
       }
@@ -226,17 +263,7 @@
       log.error("Error evaluating filter expression: " + e.getMessage(), e);
     }
 
-    if (!dynamicWhere.equals("")) {
-      log.debug("Adding to where clause (based on filter expression): " + dynamicWhere);
-
-      String currentWhere = parameters.get(JsonConstants.WHERE_PARAMETER);
-
-      if (currentWhere == null || currentWhere.equals("null") || currentWhere.equals("")) {
-        parameters.put(JsonConstants.WHERE_PARAMETER, dynamicWhere);
-      } else {
-        parameters.put(JsonConstants.WHERE_PARAMETER, currentWhere + " and " + dynamicWhere);
-      }
-    }
+    return dynamicWhere;
   }
 
   /**
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-multi-selector-item.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-multi-selector-item.js	Wed Aug 07 09:31:14 2013 +0200
@@ -244,7 +244,12 @@
   },
 
   destroy: function () {
-    // Explicitly destroy the selector window to avoid memory leaks
+    // Explicitly destroy elements avoid memory leaks
+    if (this.canvas) {
+      this.canvas.destroy();
+      this.canvas = null;
+    }
+
     if (this.selectorWindow) {
       this.selectorWindow.destroy();
       this.selectorWindow = null;
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Aug 07 09:31:14 2013 +0200
@@ -101,33 +101,12 @@
 
       getFetchRequestParams: function (params) {
         params = params || {};
-        // on purpose not passing the third boolean param
-        if (this.selector && this.selector.form && this.selector.form.view && this.selector.form.view.getContextInfo) {
-          isc.addProperties(params, this.selector.form.view.getContextInfo(false, true));
-        } else if (this.view && this.view.sourceView && this.view.sourceView.getContextInfo) {
-          isc.addProperties(params, this.view.sourceView.getContextInfo(false, true));
+        if (this.selector) {
+          isc.OBSelectorItem.prepareDSRequest(params, this.selector);
         }
 
-        // also adds the special ORG parameter
-        if (params.inpadOrgId) {
-          params[OB.Constants.ORG_PARAMETER] = params.inpadOrgId;
-        }
-        params[OB.Constants.WHERE_PARAMETER] = this.selector.whereClause;
-
-        // set the default sort option
-        params[OB.Constants.SORTBY_PARAMETER] = this.displayField;
-
-        params._selectorDefinitionId = this.selector.selectorDefinitionId;
         params._requestType = 'Window';
 
-        // Include the windowId in the params if possible
-        if (this.selector.form && this.selector.form.view && this.selector.form.view.standardProperties && this.selector.form.view.standardProperties.inpwindowId) {
-          params.windowId = this.selector.form.view.standardProperties.inpwindowId;
-        }
-
-        // add field's default filter expressions
-        params.filterClass = 'org.openbravo.userinterface.selector.SelectorDataSourceFilter';
-
         if (this.getSelectedRecord()) {
           params._targetRecordId = this.targetRecordId;
         }
@@ -757,6 +736,8 @@
     requestProperties = requestProperties || {};
     requestProperties.params = requestProperties.params || {};
 
+    isc.OBSelectorItem.prepareDSRequest(requestProperties.params, this);
+
     // sometimes the value is passed as a filter criteria remove it
     if (this.getValueFieldName() && requestProperties.params[this.getValueFieldName()]) {
       requestProperties.params[this.getValueFieldName()] = null;
@@ -765,31 +746,6 @@
     // do not prevent the count operation
     requestProperties.params[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'true';
 
-    // on purpose not passing the third boolean param
-    if (this.form && this.form.view && this.form.view.getContextInfo) {
-      isc.addProperties(requestProperties.params, this.form.view.getContextInfo(false, true));
-    } else if (this.view && this.view.sourceView && this.view.sourceView.getContextInfo) {
-      isc.addProperties(requestProperties.params, this.view.sourceView.getContextInfo(false, true));
-    }
-
-    if (this.form && this.form.view && this.form.view.standardWindow) {
-      isc.addProperties(requestProperties.params, {
-        windowId: this.form.view.standardWindow.windowId,
-        tabId: this.form.view.tabId,
-        moduleId: this.form.view.moduleId
-      });
-    }
-
-    // also add the special ORG parameter
-    if (requestProperties.params.inpadOrgId) {
-      requestProperties.params[OB.Constants.ORG_PARAMETER] = requestProperties.params.inpadOrgId;
-    }
-
-    // Include the windowId in the params if possible
-    if (this.form && this.form.view && this.form.view.standardProperties && this.form.view.standardProperties.inpwindowId) {
-      requestProperties.params.windowId = this.form.view.standardProperties.inpwindowId;
-    }
-
     if (this.form.getFocusItem() !== this && !this.form.view.isShowingForm && this.getEnteredValue() === '' && this.savedEnteredValue) {
       this.setElementValue(this.savedEnteredValue);
       delete this.savedEnteredValue;
@@ -811,19 +767,6 @@
       }
     }
 
-    // adds the selector id to filter used to get filter information
-    requestProperties.params._selectorDefinitionId = this.selectorDefinitionId;
-
-    // add field's default filter expressions
-    requestProperties.params.filterClass = 'org.openbravo.userinterface.selector.SelectorDataSourceFilter';
-
-    // the additional where clause
-    requestProperties.params[OB.Constants.WHERE_PARAMETER] = this.whereClause;
-
-    // and sort according to the display field
-    // initially
-    requestProperties.params[OB.Constants.SORTBY_PARAMETER] = this.displayField;
-
     return this.Super('filterDataBoundPickList', [requestProperties, dropCache]);
   },
 
@@ -911,10 +854,67 @@
       this.selectorWindow.destroy();
       this.selectorWindow = null;
     }
+
+    // Sometimes, internal _columnSizer member of pickList is leaked
+    if (this.pickList && this.pickList.members && this.pickList.members.length > 0 && this.pickList.members[0]._columnSizer) {
+      this.pickList.members[0]._columnSizer.destroy();
+    }
+
     this.Super('destroy', arguments);
   }
 });
 
+isc.OBSelectorItem.addClassMethods({
+  // Prepares requestProperties adding contextInfo, this is later used in backed
+  // to prepare filters 
+  prepareDSRequest: function (params, selector) {
+    // on purpose not passing the third boolean param
+    if (selector.form && selector.form.view && selector.form.view.getContextInfo) {
+      isc.addProperties(params, selector.form.view.getContextInfo(false, true));
+    } else if (selector.view && selector.view.sourceView && selector.view.sourceView.getContextInfo) {
+      isc.addProperties(params, selector.view.sourceView.getContextInfo(false, true));
+    }
+
+    if (selector.form && selector.form.view && selector.form.view.standardWindow) {
+      isc.addProperties(params, {
+        windowId: selector.form.view.standardWindow.windowId,
+        tabId: selector.form.view.tabId,
+        moduleId: selector.form.view.moduleId
+      });
+    }
+
+    // Include the windowId in the params if possible
+    if (selector.form && selector.form.view && selector.form.view.standardProperties && selector.form.view.standardProperties.inpwindowId) {
+      params.windowId = selector.form.view.standardProperties.inpwindowId;
+    }
+
+    // also add the special ORG parameter
+    if (params.inpadOrgId) {
+      params[OB.Constants.ORG_PARAMETER] = params.inpadOrgId;
+    }
+
+    // adds the selector id to filter used to get filter information
+    params._selectorDefinitionId = selector.selectorDefinitionId;
+
+    // add field's default filter expressions
+    params.filterClass = 'org.openbravo.userinterface.selector.SelectorDataSourceFilter';
+
+    // the additional where clause
+    params[OB.Constants.WHERE_PARAMETER] = selector.whereClause;
+
+    // and sort according to the display field
+    // initially
+    params[OB.Constants.SORTBY_PARAMETER] = selector.displayField;
+
+    // Parameter windows
+    if (selector.form.paramWindow) {
+      params._processDefinitionId = selector.form.paramWindow.processId;
+      params._selectorFieldId = selector.paramId;
+      isc.addProperties(params, selector.form.paramWindow.getContextInfo());
+    }
+  }
+});
+
 isc.ClassFactory.defineClass('OBSelectorLinkItem', isc.StaticTextItem);
 
 isc.ClassFactory.mixInInterface('OBSelectorLinkItem', 'OBLinkTitleItem');
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.20831]]></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>
@@ -23,7 +23,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--96998CBC42744B3DBEE28AC8095C9335--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.20831]]></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.skin.250to300Comp/web/org.openbravo.userinterface.skin.250to300Comp/skins/250to300Comp/Openbravo_ERP_250.css	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/web/org.openbravo.userinterface.skin.250to300Comp/skins/250to300Comp/Openbravo_ERP_250.css	Wed Aug 07 09:31:14 2013 +0200
@@ -336,6 +336,7 @@
   border-bottom: 1px solid #A7ABB4;
   border-right: 1px solid #BBBFB6;
   border-left : 1px solid #BBBFB6;
+  background-position: bottom left;
   background-image: url(Common/DataGrid/backgroundHeader.normal.png);  
   background-color: #ECEEE9;
   _background-color: #ECEEE9;
@@ -349,6 +350,7 @@
   border-bottom: 1px solid #A7ABB4;
   border-right: 1px solid #BBBFB6;
   border-left : 1px solid #BBBFB6;
+  background-position: bottom left;
   background-image: url(Common/DataGrid/backgroundHeader.normal.png);  
   background-color: #ECEEE9;
   _background-color: #ECEEE9;
@@ -360,18 +362,21 @@
 }
 
 th.DataGrid_Header_Cell_hover {
+  background-position: bottom left;
   background-image: url(Common/DataGrid/backgroundHeader.rollover.png);  
   background-color: #FFFFFF;
   _background-color: #FFFFFF;
 }
 
 th.DataGrid_Header_Cell_active {
+  background-position: top left;
   background-image: url(Common/DataGrid/backgroundHeader.pressed.png);  
   background-color: #FFFFFF;
   _background-color: #FFFFFF;
 }
 
 th.DataGrid_Header_Cell_sorted {
+  background-position: bottom left;
   background-image: url(Common/DataGrid/backgroundHeader.selected.png);  
   background-color: #FFFFFF;
   _background-color: #FFFFFF;
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.20831]]></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>
@@ -23,7 +23,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0
 Updated to new SmartClient 8.3d 26-May-2012]]></UPDATEINFO>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js	Wed Aug 07 09:31:14 2013 +0200
@@ -19140,7 +19140,7 @@
 if(isc.Log && isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime')
 else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM
 else isc._preLog=[isc._pTM]}isc.definingFramework=true;isc.ClassFactory.defineClass("RichTextCanvas","Canvas");isc.A=isc.RichTextCanvas;isc.A.FULL="full";isc.A.unsupportedErrorMessage="Rich text editing not supported in this browser";isc.A=isc.RichTextCanvas.getPrototype();isc.A.editable=true;isc.A.canSelectText=true;isc.A.canFocus=true;isc.A._useFocusProxy=false;isc.A.overflow=isc.Canvas.AUTO;isc.A.showCustomScrollbars=false;isc.A.fullSyntaxHiliteDelay=3000;isc.A.contents="";isc.A=isc.RichTextCanvas;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.supportsRichTextEditing=function isc_c_RichTextCanvas_supportsRichTextEditing(){var _1=((isc.Browser.isSafari&&isc.Browser.safariVersion>=312)||(isc.Browser.isIE)||(isc.Browser.isMoz&&!isc.Browser.isCamino)||isc.Browser.isOpera);return _1}
-);isc.B._maxIndex=isc.C+1;isc.A=isc.RichTextCanvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$19v="<BR>";isc.A.$185="Enter";isc.A.ignoreKeys=["Arrow_Up","Arrow_Down","Arrow_Left","Arrow_Right","Ctrl","Alt"];isc.B.push(isc.A.initWidget=function isc_RichTextCanvas_initWidget(){if(!isc.RichTextCanvas.supportsRichTextEditing()){var _1=isc.RichTextCanvas.unsupportedErrorMessage;this.logError(_1)}
+);isc.B._maxIndex=isc.C+1;isc.A=isc.RichTextCanvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$19v="<BR>";isc.A.$185="Enter";isc.A.ignoreKeys=["Arrow_Up","Arrow_Down","Arrow_Left","Arrow_Right","Ctrl","Alt","Tab"];isc.B.push(isc.A.initWidget=function isc_RichTextCanvas_initWidget(){if(!isc.RichTextCanvas.supportsRichTextEditing()){var _1=isc.RichTextCanvas.unsupportedErrorMessage;this.logError(_1)}
 if(this.overflow!=isc.Canvas.AUTO){this.logWarn('RichTextCanvas class currently only supports an overflow property of "auto"');this.overflow=isc.Canvas.AUTO}
 if(this.$384()){this._useNativeTabIndex=false}
 this.Super("initWidget",arguments)}
@@ -19148,7 +19148,7 @@
 return _1}else return this.Super("$ww",arguments)}
 ,isc.A.getInnerHTML=function isc_RichTextCanvas_getInnerHTML(){if(this.$384()&&!this.isPrinting){return this.getIFrameHTML()}
 return this.getContents(true)}
-,isc.A.$384=function isc_RichTextCanvas__useDesignMode(){return isc.Browser.isMoz||isc.Browser.isSafari}
+,isc.A.$384=function isc_RichTextCanvas__useDesignMode(){return (isc.Browser.isChrome||isc.Browser.isSafari||isc.Browser.isOpera||isc.Browser.isMoz)}
 ,isc.A.getIFrameHTML=function isc_RichTextCanvas_getIFrameHTML(){var _1=isc.Browser.isSafari,_2=_1?isc.Page.getBlankFrameURL():null,_3=this.getContentFrameWidth()+isc.px,_4=this.getContentFrameHeight()+isc.px,_5=["<IFRAME STYLE='margin:0px;padding:0px;border:0px;width:",_3,";height:",_4,";'",(_1||true?" src='"+isc.Page.getURL("[HELPERS]empty.html")+"'":null)," ONLOAD='",this.getID(),".$385();'"," TABINDEX=",this.getTabIndex()," ID='",this.getIFrameID(),"'></IFRAME>"];return _5.join(isc.emptyString)}
 ,isc.A.$0y=function isc_RichTextCanvas__setHandleTabIndex(_1){if(this.$384()){var _2=this.getContentFrame();if(_2!=null)_2.tabIndex=_1}else{return this.Super("$0y",arguments)}}
 ,isc.A.getBrowserSpellCheck=function isc_RichTextCanvas_getBrowserSpellCheck(){return true}
@@ -19164,7 +19164,7 @@
 ,isc.A.$z7=function isc_RichTextCanvas___adjustOverflow(){this.Super("$z7",arguments);if(!this.$384()||this.overflow!=isc.Canvas.AUTO)return;var _1=this.getScrollHeight(),_2=this.getScrollWidth(),_3=this.getHeight(),_4=this.getWidth(),_5=this.getScrollbarSize(),_6=false,_7=false;if(_1>_3)_7=true;if(_6)_4-=_5;if(_2>_4)_6=true;if(_6&&!_7&&(_1>_3-_5))_7=true;this.hscrollOn=_6;this.vscrollOn=_7}
 ,isc.A.getContentFrameWidth=function isc_RichTextCanvas_getContentFrameWidth(){return this.getWidth()-this.getHMarginBorderPad()}
 ,isc.A.getContentFrameHeight=function isc_RichTextCanvas_getContentFrameHeight(){return this.getHeight()-this.getHMarginBorderPad()}
-,isc.A.$vu=function isc_RichTextCanvas__setHandleRect(_1,_2,_3,_4){this.Super("$vu",arguments);if(this.$384()){var _5=this.getContentFrame();if(_5!=null){var _6=this.getContentFrameWidth(),_7=this.getContentFrameHeight();_5.style.width=_6+"px";_5.style.height=_7+"px"}}}
+,isc.A.$vu=function isc_RichTextCanvas__setHandleRect(_1,_2,_3,_4){this.Super("$vu",arguments);if(this.$384()){var _5=this.getContentFrame();if(_5!=null){var _6=this.getContentFrameWidth(),_7=this.getContentFrameHeight();_5.style.width=_6-1+"px";_5.style.height=_7-1+"px"}}else{var _8=this.getHandle();if(_8!=null){var _9=this.getContentFrameWidth(),_10=this.getContentFrameHeight();_8.style.width=_9-1+"px";_8.style.height=_10-1+"px";}}}
 ,isc.A.getScrollWidth=function isc_RichTextCanvas_getScrollWidth(_1){if((this.$xu&&!_1)||!this.$384())
 return this.Super("getScrollWidth",arguments);var _2=this.getContentBody();if(!_2)return this.Super("getScrollWidth",arguments);this.$xu=isc.Element.getScrollWidth(_2);return this.$xu}
 ,isc.A.getScrollHeight=function isc_RichTextCanvas_getScrollHeight(_1){if((this.$xy&&!_1)||!this.$384())
@@ -19181,13 +19181,15 @@
 ,isc.A.draw=function isc_RichTextCanvas_draw(){this.Super("draw",arguments);if(!isc.Browser.isSafari&&this.$384())
 isc.EventHandler.registerMaskableItem(this,true);if(this.$384()){this.$386=true}else{this.$387()}}
 ,isc.A.redraw=function isc_RichTextCanvas_redraw(){var _1=this.$384();if(_1)this.$39f();this.Super("redraw",arguments);if(_1)this.$386=true}
-,isc.A.$387=function isc_RichTextCanvas__setupEditArea(){var _1=this.$384();if(_1){if(!this.$39g){this.$39g=new Function("event","var returnValue="+this.getID()+".$39h(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
-if(!this.$39i){this.$39i=new Function("event","var returnValue="+this.getID()+".$39j(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
-if(!this.$39k){this.$39k=new Function("event","var returnValue="+this.getID()+".$39l(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
+,isc.A.$387=function isc_RichTextCanvas__setupEditArea(){var _1=this.$384();if(_1){var _9=isc.Browser.isChrome||isc.Browser.isSafari,_10=(_9?"this.defaultView.frameElement.ownerDocument.defaultView.":"");
+if(!this.$39g){this.$39g=new Function("event","var returnValue="+_10+this.getID()+".$39h(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
+if(!this.$39i){this.$39i=new Function("event","var returnValue="+_10+this.getID()+".$39j(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
+if(!this.$39k){this.$39k=new Function("event","var returnValue="+_10+this.getID()+".$39l(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
 if(!this.$39m){this.$39m=new Function("event","var returnValue="+this.getID()+".$39n(event);"+"if(returnValue==false && event.preventDefault)event.preventDefault()")}
 if(!this.$39o){this.$39o=new Function("event",this.getID()+".$39p();")}
 if(!this.$39q){this.$39q=new Function("event",this.getID()+".$39r();")}
-var _2=this.getContentWindow();_2.addEventListener("keypress",this.$39g,false);_2.addEventListener("keydown",this.$39i,false);_2.addEventListener("keyup",this.$39k,false);_2.addEventListener("scroll",this.$39m,false);_2.addEventListener("focus",this.$39o,false);_2.addEventListener("blur",this.$39q,false);var _3=this.getContentBody().style;_3.margin="0px";var _4=isc.Element.getStyleDeclaration(this.className);if(_4!=null){var _5=isc.Canvas.textStyleAttributes;for(var i=0;i<_5.length;i++){var _7=_5[i];_3[_7]=_4[_7]}}}
+var _2=this.getContentWindow(),_11=_2.document;var _12=(_9?_11:_2);_12.addEventListener("keypress",this.$39g,false);_12.addEventListener("keydown",this.$39i,false);_12.addEventListener("keyup",this.$39k,false);if(_9){_11.body.handleNativeEvents="false";_11.documentElement.handleNativeEvents="false";}
+_2.addEventListener("scroll",this.$39m,false);_2.addEventListener("focus",this.$39o,false);_2.addEventListener("blur",this.$39q,false);var _3=this.getContentBody().style;_3.margin="0px";var _4=isc.Element.getStyleDeclaration(this.className);if(_4!=null){var _5=isc.Canvas.textStyleAttributes;for(var i=0;i<_5.length;i++){var _7=_5[i];_3[_7]=_4[_7]}}}
 if(isc.Browser.isMoz){this.getContentBody().spellcheck=(!!this.getBrowserSpellCheck())}
 var _8=(this.editable&&!this.isDisabled());if(!_1)this.$39s(_8);else{this.delayCall("$39s",[_8,true],0)}
 if(this.syntaxHiliter&&!this.formattedOnce){this.formattedOnce=true;this.contents=this.hiliteAndCount(this.contents)}
@@ -19276,7 +19278,7 @@
 return _1}
 ,isc.A.getContents=function isc_RichTextCanvas_getContents(_1){this.$39f();if((this.syntaxHiliter||this.countLines)&&!_1){return this.removeMarkup(this.contents)}else{return this.contents}}
 ,isc.A.setContents=function isc_RichTextCanvas_setContents(_1,_2,_3,_4){if(_1==this.contents&&!_2)return;this.contents=_1;if(!this.isDrawn()||this.$386)return;this.$39t(this.hiliteAndCount(_1,_3,_4))}
-,isc.A.$39t=function isc_RichTextCanvas__setContents(_1){this.contents=_1;if(!this.isDrawn())return;if(this.$384()){var _2=this.getContentBody();if(!_2)return;_2.innerHTML=_1}else{var _3=this.getHandle();if(_3)_3.innerHTML=_1}
+,isc.A.$39t=function isc_RichTextCanvas__setContents(_1){this.contents=_1;if(!this.isDrawn())return;if(this.$384()){var _2=this.getContentBody();if(!_2)return;_2.innerHTML=_1}else{var _3=this.getHandle();if(_3){_3.innerHTML=_1_3.style.width=this.getContentFrameWidth()-1+"px";_3.style.height=this.getScrollHeight()-1+"px";}}
 this.adjustOverflow()}
 ,isc.A.hiliteAndCount=function isc_RichTextCanvas_hiliteAndCount(_1,_2,_3){if(this.syntaxHiliter){_1=this.syntaxHiliter.hilite(_1,false,_2,_3)}
 if(this.countLines){if(_1==isc.emptyString)_1="<BR>";_1=_1.replace(/((?:.*?<br>)|(?:.+$))/gi,this.$396())}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/system/helpers/empty.html	Wed Aug 07 09:31:14 2013 +0200
@@ -0,0 +1,35 @@
+<HTML>
+
+<!-- This is a blank html file used by the Isomorphic SmartClient framework -->
+<SCRIPT>
+
+
+
+
+
+if (!window.isc && document.domain && document.domain.indexOf(".") != -1 
+	&& !(new RegExp("^(\\d{1,3}\\.){3}\\d{1,3}$").test(document.domain))) 
+{
+    
+    var set = false;
+    while (document.domain.indexOf(".") != -1) {
+        try {
+            if (window.opener && window.opener.isc) break;
+            if (window.top.isc) break;
+            
+            if (!set) { document.domain = document.domain; set = true; }
+            else { document.domain = document.domain.replace(/.*?\./, ''); }
+        } catch (e) {
+            try {
+                if (!set) { document.domain = document.domain; set = true }
+                else { document.domain = document.domain.replace(/.*?\./, ''); }
+            } catch (ee) {
+                break;
+            }
+        }
+    } 
+}
+
+</SCRIPT>
+
+</HTML>
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Aug 07 09:31:14 2013 +0200
@@ -35,7 +35,7 @@
   compareDates: function (date1, date2, fieldName, otherFieldName) {
     var field = this.getField(fieldName),
         otherField = otherFieldName ? this.getField(otherFieldName) : null;
-    if ((field && (field.type === "datetime" || field.type === "_id_24")) || (otherField && (otherField.type === "datetime" || otherField.type === "_id_24"))) {
+    if ((field && (field.type === "datetime" || field.type === "_id_24" || field.type === "_id_16")) || (otherField && (otherField.type === "datetime" || otherField.type === "_id_24" || otherField.type === "_id_16"))) {
       return Date.compareDates(date1, date2);
     } else {
       return Date.compareLogicalDates(date1, date2);
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.20831]]></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
@@ -28,7 +28,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <REFERENCEDATAINFO><![CDATA[Pre-configured collection of standard ERP roles]]></REFERENCEDATAINFO>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61--></AD_MODULE>
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.20831]]></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>
@@ -24,7 +24,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <UPDATEINFO><![CDATA[minor bugfix release to include latest client.application 2.0.1, client.myob 2.0.2 and client.kernel 2.0.1]]></UPDATEINFO>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--7E48CDD73B7E493A8BED4F7253E7C989--></AD_MODULE>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -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.20523]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.20831]]></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.20523]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.20831]]></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.20523]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.20831]]></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.20523]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.20831]]></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.20523]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.20831]]></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.20523]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.20831]]></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.20523]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.20831]]></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.20523]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.20831]]></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	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3/src-db/database/configScript.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <vector>
-    <versionInfo version="3.0.19466"/>
+    <versionInfo version="3.0.20506"/>
     <columnDataChange tablename="AD_PROCESS" columnname="ISACTIVE" pkRow="800026">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -429,10 +429,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="2768">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="2771">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -557,10 +553,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="3327">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="3329">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -953,10 +945,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6430">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6528">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -1589,10 +1577,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6235E45B2B854C1BA1A3235A8A1BA783">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6C50F0BA9E0C43F0813C0D2F9E0D70A8">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -6,7 +6,7 @@
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <NAME><![CDATA[Openbravo 3.0]]></NAME>
-<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.20523]]></VERSION>
+<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.20831]]></VERSION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <DESCRIPTION><![CDATA[Openbravo 3.0 distribution template]]></DESCRIPTION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HELP><![CDATA[Openbravo 3.0 is a collection (distribution) of modules. This template is a container of all the modules and configuration changes that compose Openbravo 3.0.]]></HELP>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <URL><![CDATA[http://forge.openbravo.com/projects/vthree]]></URL>
@@ -20,7 +20,7 @@
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION_LABEL><![CDATA[MP24]]></VERSION_LABEL>
+<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0138E7A89B5E4DC3932462252801FFBC--></AD_MODULE>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Tue Aug 06 12:25:00 2013 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Aug 07 09:31:14 2013 +0200
@@ -7,7 +7,7 @@
 <!--4D11E3A70650475381139522373CD191-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4D11E3A70650475381139522373CD191-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--4D11E3A70650475381139522373CD191-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.20523]]></STARTVERSION>
+<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.20831]]></STARTVERSION>
 <!--4D11E3A70650475381139522373CD191-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_DEPENDENT_MODULE_ID>
-<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.20523]]></STARTVERSION>
+<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.20831]]></STARTVERSION>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDANT_MODULE_NAME><![CDATA[Payment Report]]></DEPENDANT_MODULE_NAME>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--60834727BB114764ACEF019F40A34562-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.20523]]></STARTVERSION>
+<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.20831]]></STARTVERSION>
 <!--60834727BB114764ACEF019F40A34562-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--8418885E97D643138B6D907671351E3D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_DEPENDENT_MODULE_ID>
-<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.20523]]></STARTVERSION>
+<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.20831]]></STARTVERSION>
 <!--8418885E97D643138B6D907671351E3D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDANT_MODULE_NAME><![CDATA[Standard Roles]]></DEPENDANT_MODULE_NAME>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.20523]]></STARTVERSION>
+<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.20831]]></STARTVERSION>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MINOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.20523]]></STARTVERSION>
+<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.20831]]></STARTVERSION>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--FF8080813189932B013189B45B59003A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B45B59003A-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B45B59003A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.20523]]></STARTVERSION>
+<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.20831]]></STARTVERSION>
 <!--FF8080813189932B013189B45B59003A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--FF8080813189932B013189B4C00F003D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.20523]]></STARTVERSION>
+<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.20831]]></STARTVERSION>
 <!--FF8080813189932B013189B4C00F003D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDANT_MODULE_NAME><![CDATA[Integration with Google APIs]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.20523]]></STARTVERSION>
+<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.20831]]></STARTVERSION>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDANT_MODULE_NAME><![CDATA[Widgets Collection]]></DEPENDANT_MODULE_NAME>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/referencedata/sampledata/F_B_International_Group.xml	Tue Aug 06 12:25:00 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1979140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ob:Openbravo xmlns:ob="http://www.openbravo.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <FinancialMgmtMatchingAlgorithm id="B98D193328B84DB89E50164A3ADD2B82">
-    <id>B98D193328B84DB89E50164A3ADD2B82</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="0"/>
-    <active>true</active>
-    <name>Standard</name>
-    <description xsi:nil="true"/>
-    <javaClassName>org.openbravo.advpaymentmngt.algorithm.StandardMatchingAlgorithm</javaClassName>
-    <matchbpname>false</matchbpname>
-    <matchreference>false</matchreference>
-    <matchtransactiondate>false</matchtransactiondate>
-  </FinancialMgmtMatchingAlgorithm>
-  <FIN_Payment_Detail id="00A9F3805820483F9B32929836462D16">
-    <id>00A9F3805820483F9B32929836462D16</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="C33F00F7C52A4CA0B82A9F419526EFFF"/>
-    <amount>2714</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="013FB11B0F464D0CA492ED8E3249C5CF">
-    <id>013FB11B0F464D0CA492ED8E3249C5CF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="59CE681BF3F443EAB7D573DB99320B9C"/>
-    <amount>3432030.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0192B585CC844CF1995A249AB2A812A7">
-    <id>0192B585CC844CF1995A249AB2A812A7</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="59CE681BF3F443EAB7D573DB99320B9C"/>
-    <amount>3183050.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="023D39220D914841A0A9CE2D5B41B025">
-    <id>023D39220D914841A0A9CE2D5B41B025</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="21F5396F1B5348B080F4919A85E90239"/>
-    <amount>160714.26</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="02C5908BDC7E4A0189FA94F8CCCA0AB2">
-    <id>02C5908BDC7E4A0189FA94F8CCCA0AB2</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="D30A9C6DFF234FDCB19EF194F554E470"/>
-    <amount>221017.63</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="034FDB46C8AF41908EDF75EA19E1866E">
-    <id>034FDB46C8AF41908EDF75EA19E1866E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="1255E7BF56D24DB39E4DD28BC8E41162"/>
-    <amount>2891.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="041FEDC7A59F45D6876C0CACAF0A525C">
-    <id>041FEDC7A59F45D6876C0CACAF0A525C</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="7008F66F39CD441EB88A3B01C6484E2F"/>
-    <amount>223237.94</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="04B34EA240E442B383B6EB28EEC1BA98">
-    <id>04B34EA240E442B383B6EB28EEC1BA98</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="761A582929DD434ABA6000AC47602B6D"/>
-    <amount>323150</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="051915B2B3D64FE0AD66C97B30C3B931">
-    <id>051915B2B3D64FE0AD66C97B30C3B931</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="100730E380AA4B4EB5B8909806A600A5"/>
-    <amount>4720</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0597069904A546858D060BA4A4E5F951">
-    <id>0597069904A546858D060BA4A4E5F951</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="F523A75348C74EC49F4476E3BDD26233"/>
-    <amount>2392</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="05B5E63DD1014BC18BCB08FB8301A040">
-    <id>05B5E63DD1014BC18BCB08FB8301A040</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="7EB87CE4067841A39197D5CAA89F170F"/>
-    <amount>258800.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="05C834B2171647479EB37BDDB7643ECA">
-    <id>05C834B2171647479EB37BDDB7643ECA</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="03602613693E442DB2F39D02D8C722A0"/>
-    <amount>7673747.40</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="07CE794F98024DC9B46D8B725875F074">
-    <id>07CE794F98024DC9B46D8B725875F074</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="7847898C64A24634A0211DF9F0F5623D"/>
-    <amount>4720</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0853EA8DB54641DB84F85726ECA5E17F">
-    <id>0853EA8DB54641DB84F85726ECA5E17F</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="9EE50FB51F7843C28E3E04F7E98D5CAD"/>
-    <amount>159654.7</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="08C3BD8936864C4BA49E575025058237">
-    <id>08C3BD8936864C4BA49E575025058237</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="7EB87CE4067841A39197D5CAA89F170F"/>
-    <amount>250500.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="08CF7CD5DB314040A3C934C1DBA748ED">
-    <id>08CF7CD5DB314040A3C934C1DBA748ED</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="E839596C07C54F7EB852CD016A6C4FD9"/>
-    <amount>222105.61</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="096C56D3E38F4E9F92085EC8437D5E21">
-    <id>096C56D3E38F4E9F92085EC8437D5E21</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="9089C31F423C4E2D925F87C79EBD0EC0"/>
-    <amount>10400</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="097A9819A20D4CE5A90A49AD66766030">
-    <id>097A9819A20D4CE5A90A49AD66766030</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="E96C3C5BE7BA4E1DAA7A84C971F7975A"/>
-    <amount>50513.56</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="09E8D8F2BE0A45E588EA77D204F70F69">
-    <id>09E8D8F2BE0A45E588EA77D204F70F69</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="EADA9BE1B4E745F19D053D2EFAE1E03A"/>
-    <amount>300015</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0A4194FC2F5A42B695276DBE3858A47B">
-    <id>0A4194FC2F5A42B695276DBE3858A47B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="2A39322167534B47AEBB6482B46E4A86"/>
-    <amount>10400</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0B9987FFBD4747BD9E0827C1E904E475">
-    <id>0B9987FFBD4747BD9E0827C1E904E475</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="4895AE00B6644092858A8AD23C6BAA99"/>
-    <amount>100429.14</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0BF3E38AD0D84E44BF3EB5440E43B072">
-    <id>0BF3E38AD0D84E44BF3EB5440E43B072</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="27AE15BB409C45D9ABF10F0150D247EC"/>
-    <amount>308387.76</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0C2C6E93AFAF4B588E4FD310C993EE57">
-    <id>0C2C6E93AFAF4B588E4FD310C993EE57</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="1AEABFFAA6084E299301527898AB527F"/>
-    <amount>5820</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0C2FD1C961C14D81A4608C8BF301E8EA">
-    <id>0C2FD1C961C14D81A4608C8BF301E8EA</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="A49FFF38CF704B61BD5A93C60EAFF4CF"/>
-    <amount>322789</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0C34CDAAB5A64253A3CCC4F7AB35E783">
-    <id>0C34CDAAB5A64253A3CCC4F7AB35E783</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="375F163EFECD407DB9F08A8F7647C136"/>
-    <amount>4587</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0CB6B34779E64CD5BAE794BB363B89CC">
-    <id>0CB6B34779E64CD5BAE794BB363B89CC</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="5C446A423D6E428C91B20C6E147D67D8"/>
-    <amount>182722.1</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0DE25F34653346C182C1363F79889A27">
-    <id>0DE25F34653346C182C1363F79889A27</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="D8B2BE5196A2478B98241E04CA1F4EE5"/>
-    <amount>1945418.8</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0DE9526FEC6E493594D8358B8A98AFED">
-    <id>0DE9526FEC6E493594D8358B8A98AFED</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="8ABC5D72828A4D1AB2DED8031D2107BE"/>
-    <amount>4720</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0DFB9C9F881748BFB24E455F0A700319">
-    <id>0DFB9C9F881748BFB24E455F0A700319</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="6EB51B9265514B63A191FC010CB6C296"/>
-    <amount>46112.5</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0E394AC4CF984F1793BB1DC1EF7ED1FF">
-    <id>0E394AC4CF984F1793BB1DC1EF7ED1FF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="E0C3B6C97C17482C9B6AAAF923A2FD63"/>
-    <amount>308780.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0E795A9CEF424564B73F74EDBD4ADF2A">
-    <id>0E795A9CEF424564B73F74EDBD4ADF2A</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="7D6AA6CD37924347A93EB53B4453698B"/>
-    <amount>1416</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0F0892AA0CDA4124AE94B75CAE72625C">
-    <id>0F0892AA0CDA4124AE94B75CAE72625C</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="2EB9F2EF28324939AB2C29866F9D20E6"/>
-    <amount>1157</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0F48037A58054D5B9DDCF5143ECAF967">
-    <id>0F48037A58054D5B9DDCF5143ECAF967</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="A2D6875DF55E4FE3BE53B9258180B1EC"/>
-    <amount>11946.75</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0F5017AD732C44C9820E91E16E1D5A8B">
-    <id>0F5017AD732C44C9820E91E16E1D5A8B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="C31C827D34F74F42AD488045AFF41A2B"/>
-    <amount>250000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="A4087A1F6F954E0BBF23B721A7773D7D"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="0FB55477166D46D6B087F8427B5772B2">
-    <id>0FB55477166D46D6B087F8427B5772B2</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="7DF945B4354C42C28BD107A977DD202D"/>
-    <amount>213067.02</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="10448A6752C94C3CA1A65F593D22F5A9">
-    <id>10448A6752C94C3CA1A65F593D22F5A9</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="12A6FF6D543D44F6876DA2B32245AC8C"/>
-    <amount>41788.13</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="10B4F12858914F87BE8DF631C10D490B">
-    <id>10B4F12858914F87BE8DF631C10D490B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="9797663A0993416C9FECF9C690F39DDF"/>
-    <amount>1190.75</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="120C6CFD962F4658B7698B04DFB1ECE8">
-    <id>120C6CFD962F4658B7698B04DFB1ECE8</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="BE3F6BC395224529A3B318718BD5D249"/>
-    <amount>143294.98</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1214445DC24E40628937C493375E7E5E">
-    <id>1214445DC24E40628937C493375E7E5E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="73573DF7DA7345E697647BEE99B60DB0"/>
-    <amount>21710.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="127E11B1824046F7B2CEBBB1C2BB6D2D">
-    <id>127E11B1824046F7B2CEBBB1C2BB6D2D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="80517C82216A48C5876B893698B80772"/>
-    <amount>50021.4</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="128D6D1C3CD842C4BF8F04493E2194BF">
-    <id>128D6D1C3CD842C4BF8F04493E2194BF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="454F7F62E0A74E63887C0E048EB491DD"/>
-    <amount>1048618.8</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="12B78A3D638749DBBF9A908DF2338792">
-    <id>12B78A3D638749DBBF9A908DF2338792</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="0D4FADE4D8994213B6F10D1BA5DA6933"/>
-    <amount>2631.2</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="12C90D07AB0F44728BA29ED2FEDC795B">
-    <id>12C90D07AB0F44728BA29ED2FEDC795B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="B841C8ADB7734DCD9D3739FE809E3637"/>
-    <amount>4720</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="12E0A1CEE5614BD9909EDA2EFB7059EB">
-    <id>12E0A1CEE5614BD9909EDA2EFB7059EB</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="878CA1F48D1D4A89B537EFF8D7B4B44E"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="143ECFE83FE34A1EB41E395A7EE05345">
-    <id>143ECFE83FE34A1EB41E395A7EE05345</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="D005529216F24092885AB8307E4C15E2"/>
-    <amount>149558.77</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="14795DB3237E470B8AD06C0AFA55BBDA">
-    <id>14795DB3237E470B8AD06C0AFA55BBDA</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="39763B39DD9F48B4B46944129A539476"/>
-    <amount>10400</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="14FFC67ACDC84039B0087B13B0E47BD2">
-    <id>14FFC67ACDC84039B0087B13B0E47BD2</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="118CA85CD8C746F58992C8B7BECE42A0"/>
-    <amount>189773.5</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1519FE9C08F74AF9B16D12CDEE3AD88B">
-    <id>1519FE9C08F74AF9B16D12CDEE3AD88B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="52F4A95DAD814975A9A1C6A0E149F896"/>
-    <amount>4800</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="153E35E6B2AB4BF0A3EF6E6CD082B8F3">
-    <id>153E35E6B2AB4BF0A3EF6E6CD082B8F3</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="C386889E6FE94740BF2ABE5E77E79047"/>
-    <amount>116595.8</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="166BF5F2F9FA4282953CA620B9E23DF9">
-    <id>166BF5F2F9FA4282953CA620B9E23DF9</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="342C1EC6A577405BAD152220E27925E9"/>
-    <amount>13334</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="17EE01A21F594D0B96763E7DC1E4A2E5">
-    <id>17EE01A21F594D0B96763E7DC1E4A2E5</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="7256C2FC65C944A895A032E86E4BB3A9"/>
-    <amount>542100</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1905041C68D941BEB848AF03EE7BFC3D">
-    <id>1905041C68D941BEB848AF03EE7BFC3D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="C5EF6D91C2E844779A90D1763FF7A092"/>
-    <amount>2244.36</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="194EED5AE3BF4410AF169BEE597CB3D1">
-    <id>194EED5AE3BF4410AF169BEE597CB3D1</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="B296FFBD24934539BE6C895A3650FD6B"/>
-    <amount>1168554</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1AF593B829CB4B9BB5A51214D284EC4C">
-    <id>1AF593B829CB4B9BB5A51214D284EC4C</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="5D05D272F2F24EBFBE119EC1A8CB5493"/>
-    <amount>2478</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1B3F8E2937FF4210999917EAEE799DF8">
-    <id>1B3F8E2937FF4210999917EAEE799DF8</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="712FDD17CA3144CE842E29B54838FE9F"/>
-    <amount>250000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="A4087A1F6F954E0BBF23B721A7773D7D"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1C30AE031C324C25B937F92AA99136FA">
-    <id>1C30AE031C324C25B937F92AA99136FA</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="1231B3C5998A4DE88FA7A0443B1A40C1"/>
-    <amount>3037.32</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1C464C79FBA8446F8E4B32F01B586CAF">
-    <id>1C464C79FBA8446F8E4B32F01B586CAF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="9B5EC6DB33D14C24819B1A994B219F1B"/>
-    <amount>2177100</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1D13616E09D54D0F80BEF265EDC75BFE">
-    <id>1D13616E09D54D0F80BEF265EDC75BFE</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="E0A7250E2FDB4378A88D74130B196F49"/>
-    <amount>12000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1D6226A69AB247CD9FAA2F377FC6DEA1">
-    <id>1D6226A69AB247CD9FAA2F377FC6DEA1</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="489DA8206B2444598241CD26935E59ED"/>
-    <amount>114346.72</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1D89113EBAF34A4586DD5715581AFB5D">
-    <id>1D89113EBAF34A4586DD5715581AFB5D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="F58C4A8455ED4B01A668CA97EE423909"/>
-    <amount>2113325.50</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1DD19A175C1642C89792346C064C7A46">
-    <id>1DD19A175C1642C89792346C064C7A46</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="D65D38398EA14768AA6AC967AE386F45"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1DF3B36C396C4B78BB7A0F054FB4780B">
-    <id>1DF3B36C396C4B78BB7A0F054FB4780B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="9883A1A9930348A98C3C1369BCD66059"/>
-    <amount>240094.01</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1E6853C00F304CA2A41B83CC3622D292">
-    <id>1E6853C00F304CA2A41B83CC3622D292</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="0C69884FA70E461F995844AAC483E255"/>
-    <amount>159696.48</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1E74E11072184B7D8D49DC47247A9327">
-    <id>1E74E11072184B7D8D49DC47247A9327</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="3C292FAA207048DA8C3D7F33E51DE62D"/>
-    <amount>4871.25</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="1F250B4BD9BB4517948986E75F5965B7">
-    <id>1F250B4BD9BB4517948986E75F5965B7</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="9DD19988D69C4CB5ADD631312FF8435E"/>
-    <amount>142637.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="201D50B8C8AD4F05AECC0B0385FF6BC2">
-    <id>201D50B8C8AD4F05AECC0B0385FF6BC2</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="35EABC250AA34CF7A076E19AFB54871B"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="202E75B825FB4B19A545FDC5631719C6">
-    <id>202E75B825FB4B19A545FDC5631719C6</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="7F137FBDAFE249728F63987E4880EFE8"/>
-    <amount>4235</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="213600D3EB0947C6A25BABC3C06D9DE8">
-    <id>213600D3EB0947C6A25BABC3C06D9DE8</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="E461DBA36AC1478CA48ACC2F2E4CF48C"/>
-    <amount>164171.07</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2243281965974BFBA4E652E30F7D4307">
-    <id>2243281965974BFBA4E652E30F7D4307</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="E371A27BA249478097C449D7AFA1C5B8"/>
-    <amount>148664.31</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2286775326344D88AD163FA1B78B458D">
-    <id>2286775326344D88AD163FA1B78B458D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="4FE539DC630D41C5B0B29CF7834F4E97"/>
-    <amount>2105.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="22C6953142FA4F4CBA8A3B61C85D3C46">
-    <id>22C6953142FA4F4CBA8A3B61C85D3C46</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="31727F88A14D422C8F904B6BBB36BE9F"/>
-    <amount>4840</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="239921172A1248838BA82C17D9C89282">
-    <id>239921172A1248838BA82C17D9C89282</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="15D6295C6C3147F084C8891151D172C2"/>
-    <amount>2247</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="25179BFD454B47EBBBD365077DD70D49">
-    <id>25179BFD454B47EBBBD365077DD70D49</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="DE4B79FC14614ADC82AA994E8C14FC5B"/>
-    <amount>4235</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2795AB775A594F9C97D120CF6879345E">
-    <id>2795AB775A594F9C97D120CF6879345E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="F42ABADCE6AA42AF9FDA66A4B5011E80"/>
-    <amount>119559.50</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="27DDC472002D4555B7675B74C64015AB">
-    <id>27DDC472002D4555B7675B74C64015AB</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="E63B0EAE24D24992AD59EE764D6E349B"/>
-    <amount>63074.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="28296942AF904D869162FF435F41D220">
-    <id>28296942AF904D869162FF435F41D220</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="AD35DBF84B8D466D88EA04A016787789"/>
-    <amount>1770</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="28DAA23AC08144BAA64551669A55B4B0">
-    <id>28DAA23AC08144BAA64551669A55B4B0</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="FF602917CF204247B1A1B716D61A3401"/>
-    <amount>123700</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="28E4CD80FCC540EBBE905C5B2A5B0F67">
-    <id>28E4CD80FCC540EBBE905C5B2A5B0F67</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="42E67056E37947F69BC2020877C8A029"/>
-    <amount>160591.33</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2907CCCA4A974DD9BDC233BDB2794F65">
-    <id>2907CCCA4A974DD9BDC233BDB2794F65</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="9A4DFB294A544DDB81D48D1AFAAADD00"/>
-    <amount>520</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="29945E8D44064905AA533E49681B9822">
-    <id>29945E8D44064905AA533E49681B9822</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="3EA06F36A9E245BBA57A4EB8E4E3E491"/>
-    <amount>467280</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2995138D2F554660BBB90D0EB37ED441">
-    <id>2995138D2F554660BBB90D0EB37ED441</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="3621FCD2F04343719CEF4E1BC95B0882"/>
-    <amount>101513.70</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2B52B2108FCD4549A1D89F261A10FBCC">
-    <id>2B52B2108FCD4549A1D89F261A10FBCC</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="2033AA76DF324661AD6E3CE61E8C4BC5"/>
-    <amount>2814.5</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2BB7D1397FDC45958803B87A80918F14">
-    <id>2BB7D1397FDC45958803B87A80918F14</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="FF602917CF204247B1A1B716D61A3401"/>
-    <amount>94650</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2C0F6AA959394EC9AC76AB2EFDD0C39F">
-    <id>2C0F6AA959394EC9AC76AB2EFDD0C39F</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="FC28C437D46F479AB912F7914D2AD38B"/>
-    <amount>649236</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2D480F277A8046A28F2007B760E8F3DD">
-    <id>2D480F277A8046A28F2007B760E8F3DD</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="F8993C3DB234406E8D4DB459B5C12026"/>
-    <amount>1926</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2E116F77A9954ADDB06790858CB89454">
-    <id>2E116F77A9954ADDB06790858CB89454</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="A6AE76A6190F46908BBB6F1DC012EEA3"/>
-    <amount>4838</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2E5B5BB3C3FC4D9F9ED9E7CC2B0F2551">
-    <id>2E5B5BB3C3FC4D9F9ED9E7CC2B0F2551</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="63F094A27D834C6B8D46E3928048B204"/>
-    <amount>12000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2F06BE34001E43EFA7B8C44302F54949">
-    <id>2F06BE34001E43EFA7B8C44302F54949</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="C340A632D2DF46FEBFBDC70168DB2733"/>
-    <amount>2224.30</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2F40773793A1482DA7C0EEE0040F6B0E">
-    <id>2F40773793A1482DA7C0EEE0040F6B0E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="B2B4F8D5D1AE4134917CAD4743C11E1B"/>
-    <amount>12000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="2FEEB1BF486F4ADD97EBFB6F07C5DBCF">
-    <id>2FEEB1BF486F4ADD97EBFB6F07C5DBCF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="A21B21774A6C47D4AE36CF4EBE4CD8EC"/>
-    <amount>2451</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="30296E455A86403793A3F0F2520A8FC3">
-    <id>30296E455A86403793A3F0F2520A8FC3</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="DC24869313334BE18BA50E9254F464E2"/>
-    <amount>28129</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="30EE4A71C82A430BAEC770C0DBDF25F1">
-    <id>30EE4A71C82A430BAEC770C0DBDF25F1</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="A3A5B842D5CC468EA639C42F3CB192B0"/>
-    <amount>3068</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="310160E3BD2A46DF8A7979C570B4C6FE">
-    <id>310160E3BD2A46DF8A7979C570B4C6FE</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="510E9AA4B0FB49BF8B89017FCED173D3"/>
-    <amount>1957.62</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="318A01A0D3B348EEA6109B63EA16803A">
-    <id>318A01A0D3B348EEA6109B63EA16803A</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="137A63D245524E22982F8CEADD9395D5"/>
-    <amount>2280.85</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="32223146F66941C28C4C9676E7DAC117">
-    <id>32223146F66941C28C4C9676E7DAC117</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="725C8C4E3B9648EFB48124D0E686B586"/>
-    <amount>2774.38</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="32363A066B3042FF8FDB4110EBEAFD4F">
-    <id>32363A066B3042FF8FDB4110EBEAFD4F</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="9DF42D5AF4B842409A623D5FB5539CF0"/>
-    <amount>250000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="A4087A1F6F954E0BBF23B721A7773D7D"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="32384B981A974B399413C76071F01703">
-    <id>32384B981A974B399413C76071F01703</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="F6EFAD45044947AFAD193F16BBFB1CC5"/>
-    <amount>1171740</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="329A312A7FA840A6861E0517009A7971">
-    <id>329A312A7FA840A6861E0517009A7971</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="0FF8ED84EECF44BC8EDB760961BE32D5"/>
-    <amount>741050</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="32C7A4C013EE451E844351D0F3A537DF">
-    <id>32C7A4C013EE451E844351D0F3A537DF</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="13E1DD39B6C449919AAFFD1B842D99E3"/>
-    <amount>214969.52</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="341F2200DDF44983A87B4968083B864A">
-    <id>341F2200DDF44983A87B4968083B864A</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="398E7A5BD3374154BD213BAF3F35CBA0"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="345E438BD6A04357901D3CFF866C75FE">
-    <id>345E438BD6A04357901D3CFF866C75FE</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="2E834093B6AD4118ABA9C1F7D8E8F445"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="346438ED61EE46AF87ABBBCE365C9A3F">
-    <id>346438ED61EE46AF87ABBBCE365C9A3F</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="2201C5A6634944DC846341AC7EF4E4CD"/>
-    <amount>250000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="A4087A1F6F954E0BBF23B721A7773D7D"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="34D0E5DE02344DC89648E4BD06CF042D">
-    <id>34D0E5DE02344DC89648E4BD06CF042D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="B30C6291CC9143DC98F0234004A01276"/>
-    <amount>218078.62</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="34ECEBC9BF5C44C9B169B704E455B527">
-    <id>34ECEBC9BF5C44C9B169B704E455B527</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="DF895125AFD84C6785E5E8AB4E85212D"/>
-    <amount>350000</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem id="F37E42A338854490A764A714024300B6"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3503F0BD21E14EB8919C97D7F21EFC72">
-    <id>3503F0BD21E14EB8919C97D7F21EFC72</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="A49ECE15209347CA8C813D187AE17E9E"/>
-    <amount>5620</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="354D55E7D36246E3BFAE014B09A7D15D">
-    <id>354D55E7D36246E3BFAE014B09A7D15D</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="C8CCA4A36A2C43409ECA84DB4B07BC4B"/>
-    <amount>2386.39</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3567BB8B612F47BF9FE91640F8E34322">
-    <id>3567BB8B612F47BF9FE91640F8E34322</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="13323FBCD140420D98B4B0DB946C390E"/>
-    <amount>1793.6</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="36CC9E16E308447DA8B9AC5049E9D1F2">
-    <id>36CC9E16E308447DA8B9AC5049E9D1F2</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="DC206C91AA6A4897B44DA897936E0EC3"/>
-    <finPayment id="B1512AB47EBA443499B71C6F2F54873C"/>
-    <amount>183074.99</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="382ABB71B6CE4C209FB4345E7D57598B">
-    <id>382ABB71B6CE4C209FB4345E7D57598B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="522B5FB120C54CC9A0CE509192D07B36"/>
-    <amount>2950</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="397269E17ABC48DB9EE9904B7A2A7F6E">
-    <id>397269E17ABC48DB9EE9904B7A2A7F6E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="F3921BAEBED54B0DBB57204B590FC4C2"/>
-    <amount>3630</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="39E13C4C4F2B4C54B9D4338EFB03BC41">
-    <id>39E13C4C4F2B4C54B9D4338EFB03BC41</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="BAE22373FEBE4CCCA24517E23F0C8A48"/>
-    <finPayment id="5CD420315AA14B1795C3E3CA7B331F84"/>
-    <amount>222338.02</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3A4F00DA7309463ABA452522E8F81E07">
-    <id>3A4F00DA7309463ABA452522E8F81E07</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="7BABA5FF80494CAFA54DEBD22EC46F01"/>
-    <finPayment id="F428B344AB83452B8C71B2E740A4691B"/>
-    <amount>140462.50</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3A5492264B094A1CB1CBB946D3B33653">
-    <id>3A5492264B094A1CB1CBB946D3B33653</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="90BA30C017E04999B885D4739250B32E"/>
-    <amount>70270.75</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3AD53DBDA20249DE915D46F7D8E99C13">
-    <id>3AD53DBDA20249DE915D46F7D8E99C13</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="4E3C0CC90A3041649A61B117A5019C74"/>
-    <amount>12000.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3B2BCFD35F7346EDA8F498BFFA317BA6">
-    <id>3B2BCFD35F7346EDA8F498BFFA317BA6</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="22411AED855142ACBE845D628A17F6F8"/>
-    <amount>1507442.20</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3C732033DFA94EFF81378670BE93E388">
-    <id>3C732033DFA94EFF81378670BE93E388</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="60B236CD20464EE4B8CAEB77EAE296F0"/>
-    <amount>278550</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3CD1C44C7E66460EADB100528ED62F4C">
-    <id>3CD1C44C7E66460EADB100528ED62F4C</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="B249BC444D8E4463A0FA2F42E10658CC"/>
-    <amount>1800</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3D1669054DD24554B166EC28895697FD">
-    <id>3D1669054DD24554B166EC28895697FD</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="603AF21F4BDE45E0A15E19167527E43D"/>
-    <amount>3770.1</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3D8CE0D975C3441F8523BF83541A7707">
-    <id>3D8CE0D975C3441F8523BF83541A7707</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="9A2A07CA955D48609D87AC64F94D31D6"/>
-    <amount>1416</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3EAA9A3393FD4E7F94BAE2AA0A09B466">
-    <id>3EAA9A3393FD4E7F94BAE2AA0A09B466</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="3EA06F36A9E245BBA57A4EB8E4E3E491"/>
-    <amount>212636</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3EBFDA5C8F63458F8534DCB11D767B25">
-    <id>3EBFDA5C8F63458F8534DCB11D767B25</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="FEDEA6FC21A64D048782E76B522148E8"/>
-    <amount>189685</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3EECDC0FB46349ED8A9315DD5FD81C7B">
-    <id>3EECDC0FB46349ED8A9315DD5FD81C7B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="93DAA580DC95486D9141E1E46ECDC220"/>
-    <amount>257750</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3F17A50D17474BBC873F2B3293BA758E">
-    <id>3F17A50D17474BBC873F2B3293BA758E</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="E443A31992CB4635AFCAEABE7183CE85"/>
-    <finPayment id="6A370E5EE39D40D6A12233A8BA9F40AF"/>
-    <amount>618933.6</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3F50EA78EB4343A184C25B2F1BF7F627">
-    <id>3F50EA78EB4343A184C25B2F1BF7F627</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="8E71D7F473D74AE1839D4BD4D7361E2E"/>
-    <amount>60889.19</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3FA8FBC5B25E4BBCB6DEC7D33E95D608">
-    <id>3FA8FBC5B25E4BBCB6DEC7D33E95D608</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="8331E500D140470EAC49DD01B5105AC0"/>
-    <amount>4720</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="3FFFF5E17430427FB4B2EA2D3FEC3C5F">
-    <id>3FFFF5E17430427FB4B2EA2D3FEC3C5F</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="331884A03CEF4F3F99D07D60E33EE873"/>
-    <amount>558700</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="42224B0A9261466F98F42128A1286929">
-    <id>42224B0A9261466F98F42128A1286929</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="B843C30461EA4501935CB1D125C9C25A"/>
-    <finPayment id="820CE8DB13C64CC2A1AD89E4F43B19C0"/>
-    <amount>6844.00</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>
-  </FIN_Payment_Detail>
-  <FIN_Payment_Detail id="427E8369B72B44FF908BAE79BF73D61B">
-    <id>427E8369B72B44FF908BAE79BF73D61B</id>
-    <client id="23C59575B9CF467C9620760EB255B389"/>
-    <organization id="2E60544D37534C0B89E765FE29BC0B43"/>
-    <finPayment id="BA4DD7A806294022B83277481A7758B3"/>
-    <amount>3800</amount>
-    <refund>false</refund>
-    <active>true</active>
-    <writeoffAmount>0.00</writeoffAmount>
-    <gLItem xsi:nil="true"/>
-    <isprepayment>false</isprepayment>