[Managerial] Allows to Create Payment From Process Batch button
authorDavid Miguelez <david.miguelez@openbravo.com>
Sun, 25 Nov 2012 16:19:52 +0100
changeset 18908 7587273e2973
parent 18907 e383ce9084f1
child 18909 510899d2e90a
[Managerial] Allows to Create Payment From Process Batch button
of GL Journal and form Complete button of GL Journal Header.
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/ProcessBatch.java
src-db/database/model/tables/GL_JOURNALLINE.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_FIELDGROUP.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_PROCESS.xml
src/org/openbravo/service/db/DalBaseProcess.java
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -8203,7 +8203,7 @@
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[35]]></POSITION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[38]]></POSITION>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -795,7 +795,7 @@
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='']]></DISPLAYLOGIC>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='' & @Processed@='Y']]></DISPLAYLOGIC>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <SEQNO><![CDATA[240]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -48,6 +48,18 @@
 <!--46A3E47C3F414E948988B487A85FC244-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--46A3E47C3F414E948988B487A85FC244--></AD_MODEL_OBJECT>
 
+<!--733555DE925D4789BF94835D50EEEE14--><AD_MODEL_OBJECT>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_MODEL_OBJECT_ID><![CDATA[733555DE925D4789BF94835D50EEEE14]]></AD_MODEL_OBJECT_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ACTION><![CDATA[P]]></ACTION>
+<!--733555DE925D4789BF94835D50EEEE14-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.FIN_AddPaymentFromJournal]]></CLASSNAME>
+<!--733555DE925D4789BF94835D50EEEE14-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--733555DE925D4789BF94835D50EEEE14-->  <AD_PROCESS_ID><![CDATA[5BE14AA10165490A9ADEFB7532F7FA94]]></AD_PROCESS_ID>
+<!--733555DE925D4789BF94835D50EEEE14-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--733555DE925D4789BF94835D50EEEE14--></AD_MODEL_OBJECT>
+
 <!--89313103AC3C4CC0BF080175CE85AEE9--><AD_MODEL_OBJECT>
 <!--89313103AC3C4CC0BF080175CE85AEE9-->  <AD_MODEL_OBJECT_ID><![CDATA[89313103AC3C4CC0BF080175CE85AEE9]]></AD_MODEL_OBJECT_ID>
 <!--89313103AC3C4CC0BF080175CE85AEE9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -140,6 +140,25 @@
 <!--58A9261BACEF45DDA526F29D8557272D-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--58A9261BACEF45DDA526F29D8557272D--></AD_PROCESS>
 
+<!--5BE14AA10165490A9ADEFB7532F7FA94--><AD_PROCESS>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_PROCESS_ID><![CDATA[5BE14AA10165490A9ADEFB7532F7FA94]]></AD_PROCESS_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <VALUE><![CDATA[FIN_AddPaymentFromJournal]]></VALUE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <NAME><![CDATA[Add Payment From Journal]]></NAME>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94--></AD_PROCESS>
+
 <!--6255BE488882480599C81284B70CD9B3--><AD_PROCESS>
 <!--6255BE488882480599C81284B70CD9B3-->  <AD_PROCESS_ID><![CDATA[6255BE488882480599C81284B70CD9B3]]></AD_PROCESS_ID>
 <!--6255BE488882480599C81284B70CD9B3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -17,7 +17,7 @@
 <!--173E22F30A234210BE895DBB291AE971-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
 <!--173E22F30A234210BE895DBB291AE971-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--173E22F30A234210BE895DBB291AE971-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--173E22F30A234210BE895DBB291AE971-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@) > 0) THEN fin_paymentmethod_id ELSE po_paymentmethod_id END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--173E22F30A234210BE895DBB291AE971-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_PAYMENTMETHOD_ID@ IS NOT NULL AND @FIN_PAYMENTMETHOD_ID@ <> COALESCE('','-1')) THEN @FIN_PAYMENTMETHOD_ID@ ELSE (CASE WHEN (TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@) > 0) THEN fin_paymentmethod_id ELSE po_paymentmethod_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
 <!--173E22F30A234210BE895DBB291AE971-->  <AD_ELEMENT_ID><![CDATA[7DC34559B411B45BE040007F0100784A]]></AD_ELEMENT_ID>
 <!--173E22F30A234210BE895DBB291AE971--></AD_PROCESS_PARA>
 
@@ -48,8 +48,6 @@
 <!--28734F2240554E628433520DBFA0A75A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--28734F2240554E628433520DBFA0A75A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--28734F2240554E628433520DBFA0A75A-->  <NAME><![CDATA[Date]]></NAME>
-<!--28734F2240554E628433520DBFA0A75A-->  <DESCRIPTION><![CDATA[Date]]></DESCRIPTION>
-<!--28734F2240554E628433520DBFA0A75A-->  <HELP><![CDATA[Date]]></HELP>
 <!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
 <!--28734F2240554E628433520DBFA0A75A-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--28734F2240554E628433520DBFA0A75A-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
@@ -288,7 +286,7 @@
 <!--D2D748A3C65F4976B4461635A04EFA5F-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
 <!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN ((TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@)) > 0) THEN fin_financial_account_id ELSE po_financial_account_id END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
+<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_FINANCIAL_ACCOUNT_ID@ IS NOT NULL AND @FIN_FINANCIAL_ACCOUNT_ID@ <> COALESCE('','-1')) THEN @FIN_FINANCIAL_ACCOUNT_ID@ ELSE (CASE WHEN ((TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@)) > 0) THEN fin_financial_account_id ELSE po_financial_account_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
 <!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ELEMENT_ID><![CDATA[7891269C840C655DE040007F010155CE]]></AD_ELEMENT_ID>
 <!--D2D748A3C65F4976B4461635A04EFA5F--></AD_PROCESS_PARA>
 
@@ -310,6 +308,7 @@
 <!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
 <!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DEFAULTVALUE><![CDATA[@C_GLItem_ID@]]></DEFAULTVALUE>
 <!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
 <!--DC3ADA42B2C443B79ACD6215AD5D9C31--></AD_PROCESS_PARA>
 
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -49,7 +49,7 @@
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccount]]></NAME>
+<!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccountOrBPartnerAcc]]></NAME>
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <TYPE><![CDATA[S]]></TYPE>
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <CODE><![CDATA[EXISTS(
 SELECT FIN_PAYMENTMETHOD_ID 
@@ -61,6 +61,20 @@
 <!--959ADF046AFE4F509ABC6E2F41F9DB04-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--959ADF046AFE4F509ABC6E2F41F9DB04--></AD_VAL_RULE>
 
+<!--BE0A211D552A4DE8AC3E6658759B396F--><AD_VAL_RULE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_VAL_RULE_ID><![CDATA[BE0A211D552A4DE8AC3E6658759B396F]]></AD_VAL_RULE_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <NAME><![CDATA[FIN_PaymentMethodInFinancialAccount]]></NAME>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <TYPE><![CDATA[S]]></TYPE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <CODE><![CDATA[EXISTS (SELECT FIN_PAYMENTMETHOD_ID 
+FROM FIN_FINACC_PAYMENTMETHOD 
+WHERE FIN_FINANCIAL_ACCOUNT_ID = @FIN_FINANCIAL_ACCOUNT_ID@ 
+AND FIN_FINACC_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID = FIN_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID)]]></CODE>
+<!--BE0A211D552A4DE8AC3E6658759B396F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--BE0A211D552A4DE8AC3E6658759B396F--></AD_VAL_RULE>
+
 <!--D035365830AF466BA81F2AB8ECC6FAE0--><AD_VAL_RULE>
 <!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
 <!--D035365830AF466BA81F2AB8ECC6FAE0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Sun Nov 25 16:19:52 2012 +0100
@@ -0,0 +1,164 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.financialmgmt.gl.GLJournal;
+import org.openbravo.model.financialmgmt.gl.GLJournalLine;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class FIN_AddPaymentFromJournal extends DalBaseProcess {
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    int cont = 0;
+
+    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+        .getProperty("dateFormat.java");
+    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
+
+    // Recover context and variables
+    ConnectionProvider conn = bundle.getConnection();
+    VariablesSecureApp varsAux = bundle.getContext().toVars();
+    HttpServletRequest request = RequestContext.get().getRequest();
+
+    OBContext.setOBContext(varsAux.getUser(), varsAux.getRole(), varsAux.getClient(),
+        varsAux.getOrg());
+    VariablesSecureApp vars = new VariablesSecureApp(request);
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String journalId = (String) bundle.getParams().get("GL_Journal_ID");
+      String docAction = vars.getStringParameter("inpdocaction");
+      if ("".equals(docAction)) {
+        docAction = "CO";
+      }
+
+      // Set the docAction of the Journal (Complete, Reactivate, Close...)
+      GLJournal journal = OBDal.getInstance().get(GLJournal.class, journalId);
+      journal.setDocumentAction(docAction);
+      OBDal.getInstance().flush();
+      OBDal.getInstance().refresh(journal);
+
+      // Check if the Lines of the Journal have related Payments. In that case
+      // the Payments must be deleted before Closing or Reactivating the line.
+      String relatedPayments = "";
+      if (!"CO".equals(docAction)) {
+        for (GLJournalLine journalLine : journal.getFinancialMgmtGLJournalLineList()) {
+          if (journalLine.getRelatedPayment() != null) {
+            relatedPayments = relatedPayments + journalLine.getLineNo() + ", ";
+          }
+        }
+      }
+      if (!"".equals(relatedPayments)) {
+        relatedPayments = relatedPayments.substring(0, relatedPayments.length() - 2);
+        throw new OBException("@FIN_JournalLineRelatedPayments@: " + relatedPayments);
+      }
+
+      try {
+        // Call GL_Journal_Post method from the database.
+        final List<Object> parameters = new ArrayList<Object>();
+        parameters.add(null);
+        parameters.add(journalId);
+        final String procedureName = "gl_journal_post";
+        CallStoredProcedure mm = CallStoredProcedure.getInstance();
+        mm.call(procedureName, parameters, null, false);
+      } catch (Exception e) {
+        OBDal.getInstance().rollbackAndClose();
+        throw new OBException(e.getCause().getMessage());
+      }
+
+      OBDal.getInstance().refresh(journal);
+      Date date = journal.getDocumentDate();
+
+      // Complete the Journal
+      if ("CO".equals(docAction)) {
+        for (GLJournalLine journalLine : journal.getFinancialMgmtGLJournalLineList()) {
+          // Recover again the object to avoid problems with Dal
+          journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLine.getId());
+          if (journalLine.isOpenItems() && journalLine.getRelatedPayment() == null) {
+            // Create bundle
+            ProcessBundle pb = new ProcessBundle("DE1B382FDD2540199D223586F6E216D0", vars)
+                .init(conn);
+            HashMap<String, Object> parameters = new HashMap<String, Object>();
+            parameters.put("GL_JournalLine_ID", journalLine.getId());
+            parameters.put("cBpartnerParaId", journalLine.getBusinessPartner().getId());
+            parameters.put("cGlitemId", journalLine.getGLItem().getId());
+            parameters.put("finFinancialAccountId", journalLine.getFinancialAccount().getId());
+            parameters.put("finPaymentmethodId", journalLine.getPaymentMethod().getId());
+            parameters.put("date", dateFormat.format(date));
+            pb.setParams(parameters);
+            OBError myMessage = null;
+            // Create a Payment for the Journal line
+            FIN_AddPaymentFromJournalLine myProcess = new FIN_AddPaymentFromJournalLine();
+            myProcess.setDoCommit(false);
+            myProcess.execute(pb);
+            myMessage = (OBError) pb.getResult();
+
+            if (myMessage.getType().equals("Error")) {
+              throw new OBException("@FIN_PaymentFromJournalError@ " + journalLine.getLineNo()
+                  + " - " + myMessage.getMessage());
+            }
+            cont++;
+          }
+        }
+      }
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+      msg.setType("Success");
+      msg.setTitle("@Success@");
+      if (cont > 0) {
+        msg.setMessage(" @FIN_NumberOfPayments@: " + cont);
+      }
+
+      OBDal.getInstance().commitAndClose();
+
+      bundle.setResult(msg);
+
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      msg.setTitle("@Error@");
+      OBDal.getInstance().rollbackAndClose();
+      bundle.setResult(msg);
+    }
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/ProcessBatch.java	Sun Nov 25 16:19:52 2012 +0100
@@ -0,0 +1,123 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.process;
+
+import java.util.Date;
+import java.util.HashMap;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.financialmgmt.gl.GLBatch;
+import org.openbravo.model.financialmgmt.gl.GLJournal;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class ProcessBatch extends DalBaseProcess {
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    int successCont = 0;
+    int errorCont = 0;
+    String errorMsg = "";
+
+    // Recover context and variables
+    ConnectionProvider conn = bundle.getConnection();
+    VariablesSecureApp varsAux = bundle.getContext().toVars();
+    HttpServletRequest request = RequestContext.get().getRequest();
+
+    OBContext.setOBContext(varsAux.getUser(), varsAux.getRole(), varsAux.getClient(),
+        varsAux.getOrg());
+    VariablesSecureApp vars = new VariablesSecureApp(request);
+
+    try {
+
+      // retrieve the parameters from the bundle
+      final String batchId = (String) bundle.getParams().get("GL_JournalBatch_ID");
+
+      GLBatch batch = OBDal.getInstance().get(GLBatch.class, batchId);
+
+      // Process the Batch
+      for (GLJournal journal : batch.getFinancialMgmtGLJournalList()) {
+        if (!journal.isProcessed()) {
+          // Recover again the object to avoid problems with Dal
+          journal = OBDal.getInstance().get(GLJournal.class, journal.getId());
+          ProcessBundle pb = new ProcessBundle("5BE14AA10165490A9ADEFB7532F7FA94", vars).init(conn);
+          HashMap<String, Object> parameters = new HashMap<String, Object>();
+          parameters.put("GL_Journal_ID", journal.getId());
+          pb.setParams(parameters);
+          OBError myMessage = null;
+          // Process each Joural
+          FIN_AddPaymentFromJournal myProcess = new FIN_AddPaymentFromJournal();
+          myProcess.execute(pb);
+          myMessage = (OBError) pb.getResult();
+
+          if (myMessage.getType().equals("Error")) {
+            errorCont++;
+            if (!"".equals(errorMsg)) {
+              errorMsg = errorMsg + "<br />";
+            }
+            errorMsg = errorMsg + "@FIN_JournalBatchErrorProcess@ " + journal.getDocumentNo()
+                + ". " + myMessage.getMessage();
+          } else {
+            successCont++;
+          }
+        }
+      }
+
+      // OBError is also used for successful results
+      final OBError msg = new OBError();
+
+      if (errorCont == 0) {
+        msg.setType("Success");
+        msg.setTitle("@Success@");
+        batch = OBDal.getInstance().get(GLBatch.class, batchId);
+        batch.setProcessed(true);
+        batch.setUpdated(new Date());
+        OBDal.getInstance().flush();
+      } else if (errorCont > 0 && successCont == 0) {
+        msg.setType("Error");
+        msg.setTitle("@Error@");
+        msg.setMessage(errorMsg);
+      } else {
+        msg.setType("Warning");
+        msg.setTitle("@Warning@");
+        msg.setMessage(errorMsg);
+      }
+
+      bundle.setResult(msg);
+
+    } catch (final OBException e) {
+      final OBError msg = new OBError();
+      msg.setType("Error");
+      msg.setMessage(e.getMessage());
+      OBDal.getInstance().rollbackAndClose();
+      bundle.setResult(msg);
+    }
+
+  }
+
+}
--- a/src-db/database/model/tables/GL_JOURNALLINE.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/model/tables/GL_JOURNALLINE.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -149,6 +149,22 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="FIN_FINANCIAL_ACCOUNT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="FIN_PAYMENTMETHOD_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="OPEN_ITEMS" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="C_GLITEM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="A_ASSET" name="GL_JOURNALLINE_A_ASSET">
         <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
       </foreign-key>
@@ -176,6 +192,9 @@
       <foreign-key foreignTable="C_DEBT_PAYMENT" name="GL_JOURNALLINE_C_DEBT_PAYMENT">
         <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_GLITEM" name="GL_JOURNALLINE_C_GLITEM">
+        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_PROJECT" name="GL_JOURNALLINE_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
@@ -194,6 +213,9 @@
       <foreign-key foreignTable="C_WITHHOLDING" name="GL_JOURNALLINE_C_WITHHOLDING">
         <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="FIN_FINANCIAL_ACCOUNT" name="GL_JOURNALLINE_FINACC" onDelete="setnull">
+        <reference local="FIN_FINANCIAL_ACCOUNT_ID" foreign="FIN_FINANCIAL_ACCOUNT_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="GL_JOURNAL" name="GL_JOURNALLINE_GL_JOURNAL">
         <reference local="GL_JOURNAL_ID" foreign="GL_JOURNAL_ID"/>
       </foreign-key>
@@ -203,6 +225,9 @@
       <foreign-key foreignTable="FIN_PAYMENT" name="GL_JOURNALLINE_PAYMENT" onDelete="setnull">
         <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="FIN_PAYMENTMETHOD" name="GL_JOURNALLINE_PAYMETHOD" onDelete="setnull">
+        <reference local="FIN_PAYMENTMETHOD_ID" foreign="FIN_PAYMENTMETHOD_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="USER1" name="GL_JOURNALLINE_USER1">
         <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
@@ -212,5 +237,6 @@
       <check name="GL_JOURNALLINE_C_TAX_ID_CHK"><![CDATA[(C_TAX_ID IS NULL) OR (C_WITHHOLDING_ID IS NULL)]]></check>
       <check name="GL_JOURNALLINE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="GL_JOURNALLINE_ISGENERATED_CHK"><![CDATA[ISGENERATED IN ('Y', 'N')]]></check>
+      <check name="GL_JOURNALLINE_OPENITEM_CHECK"><![CDATA[(OPEN_ITEMS = 'N') OR (((((OPEN_ITEMS = 'Y') AND (FIN_FINANCIAL_ACCOUNT_ID IS NOT NULL)) AND (FIN_PAYMENTMETHOD_ID IS NOT NULL)) AND (C_GLITEM_ID IS NOT NULL)) AND (C_BPARTNER_ID IS NOT NULL))]]></check>
     </table>
   </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -24925,7 +24925,7 @@
 <!--1789-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1789-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--1789-->  <AD_ELEMENT_ID><![CDATA[287]]></AD_ELEMENT_ID>
-<!--1789-->  <AD_PROCESS_ID><![CDATA[169]]></AD_PROCESS_ID>
+<!--1789-->  <AD_PROCESS_ID><![CDATA[5BE14AA10165490A9ADEFB7532F7FA94]]></AD_PROCESS_ID>
 <!--1789-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--1789-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1789-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
@@ -88858,7 +88858,7 @@
 <!--5953-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--5953-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--5953-->  <AD_ELEMENT_ID><![CDATA[1047]]></AD_ELEMENT_ID>
-<!--5953-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5953-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--5953-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--5953-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--5953-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -255934,6 +255934,40 @@
 <!--744D56EC1783443EA8499498121C551A-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--744D56EC1783443EA8499498121C551A--></AD_COLUMN>
 
+<!--74C9B0BA36F54504B760E75C6C24BFCA--><AD_COLUMN>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_COLUMN_ID><![CDATA[74C9B0BA36F54504B760E75C6C24BFCA]]></AD_COLUMN_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <NAME><![CDATA[Open Items]]></NAME>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <COLUMNNAME><![CDATA[Open_Items]]></COLUMNNAME>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <SEQNO><![CDATA[171]]></SEQNO>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_ELEMENT_ID><![CDATA[60B5E9F8DF1342A2B1550A7F9D70765C]]></AD_ELEMENT_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <POSITION><![CDATA[42]]></POSITION>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--74C9B0BA36F54504B760E75C6C24BFCA-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--74C9B0BA36F54504B760E75C6C24BFCA--></AD_COLUMN>
+
 <!--753066990E0247129B63D52B5EB343F5--><AD_COLUMN>
 <!--753066990E0247129B63D52B5EB343F5-->  <AD_COLUMN_ID><![CDATA[753066990E0247129B63D52B5EB343F5]]></AD_COLUMN_ID>
 <!--753066990E0247129B63D52B5EB343F5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -284859,6 +284893,41 @@
 <!--A03A83F49B5011DDBB0200014A62838F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--A03A83F49B5011DDBB0200014A62838F--></AD_COLUMN>
 
+<!--A05F34CDE306469B8FDD50E315B90421--><AD_COLUMN>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_COLUMN_ID><![CDATA[A05F34CDE306469B8FDD50E315B90421]]></AD_COLUMN_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <NAME><![CDATA[G/L Item]]></NAME>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <DESCRIPTION><![CDATA[An alias for the Account Combination which can be commonly used in daily operations.]]></DESCRIPTION>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <HELP><![CDATA[General ledger item.]]></HELP>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <COLUMNNAME><![CDATA[C_Glitem_ID]]></COLUMNNAME>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <SEQNO><![CDATA[181]]></SEQNO>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <POSITION><![CDATA[43]]></POSITION>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--A05F34CDE306469B8FDD50E315B90421-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--A05F34CDE306469B8FDD50E315B90421--></AD_COLUMN>
+
 <!--A068EA5C9B6711DDB53E0016D4C601F7--><AD_COLUMN>
 <!--A068EA5C9B6711DDB53E0016D4C601F7-->  <AD_COLUMN_ID><![CDATA[A068EA5C9B6711DDB53E0016D4C601F7]]></AD_COLUMN_ID>
 <!--A068EA5C9B6711DDB53E0016D4C601F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -293361,7 +293430,7 @@
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <HELP><![CDATA[Payment event]]></HELP>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <COLUMNNAME><![CDATA[FIN_Payment_ID]]></COLUMNNAME>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
-<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -293378,7 +293447,7 @@
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <POSITION><![CDATA[36]]></POSITION>
+<!--B7AC5B839A864B7EB99DCF53390E5F89-->  <POSITION><![CDATA[37]]></POSITION>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--B7AC5B839A864B7EB99DCF53390E5F89-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -303570,6 +303639,41 @@
 <!--EF00CB8D2A6C4724AD902C18A5964BDE-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--EF00CB8D2A6C4724AD902C18A5964BDE--></AD_COLUMN>
 
+<!--EF7A634D0B32412D92364EEAB00AB4D8--><AD_COLUMN>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_COLUMN_ID><![CDATA[EF7A634D0B32412D92364EEAB00AB4D8]]></AD_COLUMN_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <NAME><![CDATA[Financial Account]]></NAME>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <COLUMNNAME><![CDATA[FIN_Financial_Account_ID]]></COLUMNNAME>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <SEQNO><![CDATA[151]]></SEQNO>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_ELEMENT_ID><![CDATA[7891269C840C655DE040007F010155CE]]></AD_ELEMENT_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <POSITION><![CDATA[39]]></POSITION>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--EF7A634D0B32412D92364EEAB00AB4D8-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--EF7A634D0B32412D92364EEAB00AB4D8--></AD_COLUMN>
+
 <!--EFA882B1891B4F3F9F1EC23D70E7F152--><AD_COLUMN>
 <!--EFA882B1891B4F3F9F1EC23D70E7F152-->  <AD_COLUMN_ID><![CDATA[EFA882B1891B4F3F9F1EC23D70E7F152]]></AD_COLUMN_ID>
 <!--EFA882B1891B4F3F9F1EC23D70E7F152-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -305861,4 +305965,39 @@
 <!--FFE1ED5BBE79407B85712E8EA9B08335-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--FFE1ED5BBE79407B85712E8EA9B08335--></AD_COLUMN>
 
+<!--FEF00B4897E14942B35D2265870707A4--><AD_COLUMN>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_COLUMN_ID><![CDATA[FEF00B4897E14942B35D2265870707A4]]></AD_COLUMN_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FEF00B4897E14942B35D2265870707A4-->  <NAME><![CDATA[Payment Method]]></NAME>
+<!--FEF00B4897E14942B35D2265870707A4-->  <DESCRIPTION><![CDATA[It is the method by which payment is expected to be made or received.]]></DESCRIPTION>
+<!--FEF00B4897E14942B35D2265870707A4-->  <COLUMNNAME><![CDATA[FIN_Paymentmethod_ID]]></COLUMNNAME>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_TABLE_ID><![CDATA[226]]></AD_TABLE_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--FEF00B4897E14942B35D2265870707A4-->  <SEQNO><![CDATA[161]]></SEQNO>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_ELEMENT_ID><![CDATA[7DC34559B411B45BE040007F0100784A]]></AD_ELEMENT_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--FEF00B4897E14942B35D2265870707A4-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--FEF00B4897E14942B35D2265870707A4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FEF00B4897E14942B35D2265870707A4-->  <POSITION><![CDATA[40]]></POSITION>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--FEF00B4897E14942B35D2265870707A4-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--FEF00B4897E14942B35D2265870707A4-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--FEF00B4897E14942B35D2265870707A4-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--FEF00B4897E14942B35D2265870707A4--></AD_COLUMN>
+
 </data>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -24260,6 +24260,18 @@
 <!--5E3EDD5726B6A392E040007F01007B5C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--5E3EDD5726B6A392E040007F01007B5C--></AD_ELEMENT>
 
+<!--60B5E9F8DF1342A2B1550A7F9D70765C--><AD_ELEMENT>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <AD_ELEMENT_ID><![CDATA[60B5E9F8DF1342A2B1550A7F9D70765C]]></AD_ELEMENT_ID>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <COLUMNNAME><![CDATA[Open_Items]]></COLUMNNAME>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <NAME><![CDATA[Open Items]]></NAME>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <PRINTNAME><![CDATA[Open Items]]></PRINTNAME>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--60B5E9F8DF1342A2B1550A7F9D70765C--></AD_ELEMENT>
+
 <!--60FCCD631EB3EDF8E040007F01013AD4--><AD_ELEMENT>
 <!--60FCCD631EB3EDF8E040007F01013AD4-->  <AD_ELEMENT_ID><![CDATA[60FCCD631EB3EDF8E040007F01013AD4]]></AD_ELEMENT_ID>
 <!--60FCCD631EB3EDF8E040007F01013AD4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -10946,9 +10946,7 @@
 <!--880-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--880-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--880-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--880-->  <NAME><![CDATA[Process Journal]]></NAME>
-<!--880-->  <DESCRIPTION><![CDATA[Process Journal]]></DESCRIPTION>
-<!--880-->  <HELP><![CDATA[Process Journal]]></HELP>
+<!--880-->  <NAME><![CDATA[Add Payment From Journal]]></NAME>
 <!--880-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--880-->  <AD_TAB_ID><![CDATA[160]]></AD_TAB_ID>
 <!--880-->  <AD_COLUMN_ID><![CDATA[1789]]></AD_COLUMN_ID>
@@ -189142,6 +189140,35 @@
 <!--4C37F163BA0845D5B082D039FA3D6DCE-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--4C37F163BA0845D5B082D039FA3D6DCE--></AD_FIELD>
 
+<!--4C3BB40199364EF5AE4FD4CADF69281F--><AD_FIELD>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_FIELD_ID><![CDATA[4C3BB40199364EF5AE4FD4CADF69281F]]></AD_FIELD_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <NAME><![CDATA[Payment Method]]></NAME>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <DESCRIPTION><![CDATA[It is the method by which payment is expected to be made or received.]]></DESCRIPTION>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_COLUMN_ID><![CDATA[FEF00B4897E14942B35D2265870707A4]]></AD_COLUMN_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_FIELDGROUP_ID><![CDATA[FFEBF36F217A49C49FCDA375681FC2D6]]></AD_FIELDGROUP_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <DISPLAYLOGIC><![CDATA[@Open_Items@='Y']]></DISPLAYLOGIC>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4C3BB40199364EF5AE4FD4CADF69281F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4C3BB40199364EF5AE4FD4CADF69281F--></AD_FIELD>
+
 <!--4C5651CF2F234CE089B3146D68BD9DC3--><AD_FIELD>
 <!--4C5651CF2F234CE089B3146D68BD9DC3-->  <AD_FIELD_ID><![CDATA[4C5651CF2F234CE089B3146D68BD9DC3]]></AD_FIELD_ID>
 <!--4C5651CF2F234CE089B3146D68BD9DC3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -200141,11 +200168,12 @@
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_COLUMN_ID><![CDATA[B7AC5B839A864B7EB99DCF53390E5F89]]></AD_COLUMN_ID>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <AD_FIELDGROUP_ID><![CDATA[FFEBF36F217A49C49FCDA375681FC2D6]]></AD_FIELDGROUP_ID>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--5B8B513DB09446C4A363E1C5508ECB35-->  <DISPLAYLOGIC><![CDATA[@FIN_Payment_ID@!'']]></DISPLAYLOGIC>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <DISPLAYLOGIC><![CDATA[@Open_Items@='Y']]></DISPLAYLOGIC>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--5B8B513DB09446C4A363E1C5508ECB35-->  <SEQNO><![CDATA[125]]></SEQNO>
+<!--5B8B513DB09446C4A363E1C5508ECB35-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5B8B513DB09446C4A363E1C5508ECB35-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -201015,6 +201043,36 @@
 <!--5BFE6590A4F3417C853DA5C8F8AD8AFB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--5BFE6590A4F3417C853DA5C8F8AD8AFB--></AD_FIELD>
 
+<!--5C2D449A99B94D01A8F4356ADC3E9B03--><AD_FIELD>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_FIELD_ID><![CDATA[5C2D449A99B94D01A8F4356ADC3E9B03]]></AD_FIELD_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <NAME><![CDATA[Financial Account]]></NAME>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_COLUMN_ID><![CDATA[EF7A634D0B32412D92364EEAB00AB4D8]]></AD_COLUMN_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_FIELDGROUP_ID><![CDATA[FFEBF36F217A49C49FCDA375681FC2D6]]></AD_FIELDGROUP_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <DISPLAYLOGIC><![CDATA[@Open_Items@='Y']]></DISPLAYLOGIC>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--5C2D449A99B94D01A8F4356ADC3E9B03--></AD_FIELD>
+
 <!--5C3168CE1D6562C4E040007F010139B0--><AD_FIELD>
 <!--5C3168CE1D6562C4E040007F010139B0-->  <AD_FIELD_ID><![CDATA[5C3168CE1D6562C4E040007F010139B0]]></AD_FIELD_ID>
 <!--5C3168CE1D6562C4E040007F010139B0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -208538,6 +208596,32 @@
 <!--78AD0C2300CD4DA395D1BC5540159D82-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--78AD0C2300CD4DA395D1BC5540159D82--></AD_FIELD>
 
+<!--78C7119F152D49D0BB41F44CF62A538F--><AD_FIELD>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_FIELD_ID><![CDATA[78C7119F152D49D0BB41F44CF62A538F]]></AD_FIELD_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <NAME><![CDATA[Open Items]]></NAME>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_COLUMN_ID><![CDATA[74C9B0BA36F54504B760E75C6C24BFCA]]></AD_COLUMN_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--78C7119F152D49D0BB41F44CF62A538F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--78C7119F152D49D0BB41F44CF62A538F--></AD_FIELD>
+
 <!--78E679CB14564EB99F4C47E821B7A935--><AD_FIELD>
 <!--78E679CB14564EB99F4C47E821B7A935-->  <AD_FIELD_ID><![CDATA[78E679CB14564EB99F4C47E821B7A935]]></AD_FIELD_ID>
 <!--78E679CB14564EB99F4C47E821B7A935-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -245640,6 +245724,36 @@
 <!--D50E641CEF7343C4AA10570298558A1E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--D50E641CEF7343C4AA10570298558A1E--></AD_FIELD>
 
+<!--D52270BB77254EB997BBF874D68EEC6C--><AD_FIELD>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_FIELD_ID><![CDATA[D52270BB77254EB997BBF874D68EEC6C]]></AD_FIELD_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <NAME><![CDATA[G/L Item]]></NAME>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <DESCRIPTION><![CDATA[An alias for the Account Combination which can be commonly used in daily operations.]]></DESCRIPTION>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <HELP><![CDATA[General ledger item.]]></HELP>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_TAB_ID><![CDATA[161]]></AD_TAB_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_COLUMN_ID><![CDATA[A05F34CDE306469B8FDD50E315B90421]]></AD_COLUMN_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_FIELDGROUP_ID><![CDATA[FFEBF36F217A49C49FCDA375681FC2D6]]></AD_FIELDGROUP_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <DISPLAYLOGIC><![CDATA[@Open_Items@='Y']]></DISPLAYLOGIC>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--D52270BB77254EB997BBF874D68EEC6C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--D52270BB77254EB997BBF874D68EEC6C--></AD_FIELD>
+
 <!--D52AE609DAAA497EA62527427E53D9B2--><AD_FIELD>
 <!--D52AE609DAAA497EA62527427E53D9B2-->  <AD_FIELD_ID><![CDATA[D52AE609DAAA497EA62527427E53D9B2]]></AD_FIELD_ID>
 <!--D52AE609DAAA497EA62527427E53D9B2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELDGROUP.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_FIELDGROUP.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -585,4 +585,13 @@
 <!--F6B170DDB43E461DB53FF37F53307766-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--F6B170DDB43E461DB53FF37F53307766--></AD_FIELDGROUP>
 
+<!--FFEBF36F217A49C49FCDA375681FC2D6--><AD_FIELDGROUP>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <AD_FIELDGROUP_ID><![CDATA[FFEBF36F217A49C49FCDA375681FC2D6]]></AD_FIELDGROUP_ID>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <NAME><![CDATA[Open Items]]></NAME>
+<!--FFEBF36F217A49C49FCDA375681FC2D6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FFEBF36F217A49C49FCDA375681FC2D6--></AD_FIELDGROUP>
+
 </data>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -15069,6 +15069,17 @@
 <!--166F701CD5C440FF8B04DC51CFBD9399-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--166F701CD5C440FF8B04DC51CFBD9399--></AD_MESSAGE>
 
+<!--16EED9CBA19748FC9E63BB60F316B24D--><AD_MESSAGE>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <AD_MESSAGE_ID><![CDATA[16EED9CBA19748FC9E63BB60F316B24D]]></AD_MESSAGE_ID>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <VALUE><![CDATA[FIN_NumberOfPayments]]></VALUE>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <MSGTEXT><![CDATA[Number of Payments created:]]></MSGTEXT>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--16EED9CBA19748FC9E63BB60F316B24D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--16EED9CBA19748FC9E63BB60F316B24D--></AD_MESSAGE>
+
 <!--173455990A494A799F86C2737D8F9617--><AD_MESSAGE>
 <!--173455990A494A799F86C2737D8F9617-->  <AD_MESSAGE_ID><![CDATA[173455990A494A799F86C2737D8F9617]]></AD_MESSAGE_ID>
 <!--173455990A494A799F86C2737D8F9617-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -15575,6 +15586,17 @@
 <!--2413C331A08B4F3F98FC3F9A0F2A636C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--2413C331A08B4F3F98FC3F9A0F2A636C--></AD_MESSAGE>
 
+<!--24B4AED8FE3542C2933B4EA37DF641C5--><AD_MESSAGE>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <AD_MESSAGE_ID><![CDATA[24B4AED8FE3542C2933B4EA37DF641C5]]></AD_MESSAGE_ID>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <VALUE><![CDATA[FIN_JournalLineRelatedPayments]]></VALUE>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <MSGTEXT><![CDATA[There is a related Payment for the Journal Line/s with No.]]></MSGTEXT>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--24B4AED8FE3542C2933B4EA37DF641C5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--24B4AED8FE3542C2933B4EA37DF641C5--></AD_MESSAGE>
+
 <!--24D75AD6BD814259BFF03E41B49EDFD3--><AD_MESSAGE>
 <!--24D75AD6BD814259BFF03E41B49EDFD3-->  <AD_MESSAGE_ID><![CDATA[24D75AD6BD814259BFF03E41B49EDFD3]]></AD_MESSAGE_ID>
 <!--24D75AD6BD814259BFF03E41B49EDFD3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -16812,6 +16834,17 @@
 <!--548069F5D9E04ECF80B3EA2EA7218036-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--548069F5D9E04ECF80B3EA2EA7218036--></AD_MESSAGE>
 
+<!--550B591157934DF9BB724C6BB77EBA9B--><AD_MESSAGE>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <AD_MESSAGE_ID><![CDATA[550B591157934DF9BB724C6BB77EBA9B]]></AD_MESSAGE_ID>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <VALUE><![CDATA[FIN_PaymentFromJournalError]]></VALUE>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <MSGTEXT><![CDATA[Payment could not be created for Journal Line:]]></MSGTEXT>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--550B591157934DF9BB724C6BB77EBA9B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--550B591157934DF9BB724C6BB77EBA9B--></AD_MESSAGE>
+
 <!--5540AC0002F64173A712205D6D4DDC74--><AD_MESSAGE>
 <!--5540AC0002F64173A712205D6D4DDC74-->  <AD_MESSAGE_ID><![CDATA[5540AC0002F64173A712205D6D4DDC74]]></AD_MESSAGE_ID>
 <!--5540AC0002F64173A712205D6D4DDC74-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -17419,6 +17452,17 @@
 <!--69214D1297AF46B398BC55D7C7517EF4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--69214D1297AF46B398BC55D7C7517EF4--></AD_MESSAGE>
 
+<!--6967DA2CCC5E40879A8E540100AF0948--><AD_MESSAGE>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <AD_MESSAGE_ID><![CDATA[6967DA2CCC5E40879A8E540100AF0948]]></AD_MESSAGE_ID>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <VALUE><![CDATA[FIN_JournalBatchErrorProcess]]></VALUE>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <MSGTEXT><![CDATA[Error in Journal Header with Document No.:]]></MSGTEXT>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--6967DA2CCC5E40879A8E540100AF0948-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6967DA2CCC5E40879A8E540100AF0948--></AD_MESSAGE>
+
 <!--6AFF7D5F89EF4A92980112A343CE5687--><AD_MESSAGE>
 <!--6AFF7D5F89EF4A92980112A343CE5687-->  <AD_MESSAGE_ID><![CDATA[6AFF7D5F89EF4A92980112A343CE5687]]></AD_MESSAGE_ID>
 <!--6AFF7D5F89EF4A92980112A343CE5687-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -18682,6 +18726,17 @@
 <!--968C37CD41AD45C3AD92D394CC357A90-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--968C37CD41AD45C3AD92D394CC357A90--></AD_MESSAGE>
 
+<!--96B02DEA21084AD28903E48E2612C52A--><AD_MESSAGE>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <AD_MESSAGE_ID><![CDATA[96B02DEA21084AD28903E48E2612C52A]]></AD_MESSAGE_ID>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <VALUE><![CDATA[gl_journalline_openitem_check]]></VALUE>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <MSGTEXT><![CDATA[If Open Items is checked, Business Partner, Financial Account, Payment Method and GL Item fields must be filled.]]></MSGTEXT>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--96B02DEA21084AD28903E48E2612C52A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--96B02DEA21084AD28903E48E2612C52A--></AD_MESSAGE>
+
 <!--971C582342544D60974307973BA00A06--><AD_MESSAGE>
 <!--971C582342544D60974307973BA00A06-->  <AD_MESSAGE_ID><![CDATA[971C582342544D60974307973BA00A06]]></AD_MESSAGE_ID>
 <!--971C582342544D60974307973BA00A06-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -4100,6 +4100,18 @@
 <!--BB540F2CEA514936B5E60216ACE844B3-->  <NAME><![CDATA[ShowLogFile]]></NAME>
 <!--BB540F2CEA514936B5E60216ACE844B3--></AD_MODEL_OBJECT>
 
+<!--BD7957EF09AC459C9069914425661009--><AD_MODEL_OBJECT>
+<!--BD7957EF09AC459C9069914425661009-->  <AD_MODEL_OBJECT_ID><![CDATA[BD7957EF09AC459C9069914425661009]]></AD_MODEL_OBJECT_ID>
+<!--BD7957EF09AC459C9069914425661009-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BD7957EF09AC459C9069914425661009-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BD7957EF09AC459C9069914425661009-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BD7957EF09AC459C9069914425661009-->  <ACTION><![CDATA[P]]></ACTION>
+<!--BD7957EF09AC459C9069914425661009-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.ProcessBatch]]></CLASSNAME>
+<!--BD7957EF09AC459C9069914425661009-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--BD7957EF09AC459C9069914425661009-->  <AD_PROCESS_ID><![CDATA[188]]></AD_PROCESS_ID>
+<!--BD7957EF09AC459C9069914425661009-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--BD7957EF09AC459C9069914425661009--></AD_MODEL_OBJECT>
+
 <!--C020D3065FCC48C7BF34238EDBB6A45B--><AD_MODEL_OBJECT>
 <!--C020D3065FCC48C7BF34238EDBB6A45B-->  <AD_MODEL_OBJECT_ID><![CDATA[C020D3065FCC48C7BF34238EDBB6A45B]]></AD_MODEL_OBJECT_ID>
 <!--C020D3065FCC48C7BF34238EDBB6A45B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_PROCESS.xml	Fri Nov 23 14:11:08 2012 +0100
+++ b/src-db/database/sourcedata/AD_PROCESS.xml	Sun Nov 25 16:19:52 2012 +0100
@@ -1362,7 +1362,6 @@
 <!--188-->  <HELP><![CDATA[Process Batch]]></HELP>
 <!--188-->  <ACCESSLEVEL><![CDATA[1]]></ACCESSLEVEL>
 <!--188-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
-<!--188-->  <PROCEDURENAME><![CDATA[GL_JournalBatch_Post]]></PROCEDURENAME>
 <!--188-->  <ISREPORT><![CDATA[N]]></ISREPORT>
 <!--188-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
 <!--188-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
--- a/src/org/openbravo/service/db/DalBaseProcess.java	Fri Nov 23 14:11:08 2012 +0100
+++ b/src/org/openbravo/service/db/DalBaseProcess.java	Sun Nov 25 16:19:52 2012 +0100
@@ -37,6 +37,15 @@
  */
 public abstract class DalBaseProcess implements Process {
   private static final Logger log = Logger.getLogger(DalBaseProcess.class);
+  private boolean doCommit = true;
+
+  public boolean isDoCommit() {
+    return doCommit;
+  }
+
+  public void setDoCommit(boolean doCommit) {
+    this.doCommit = doCommit;
+  }
 
   /**
    * Is called by the process scheduler. The execute method sets the usercontext and does
@@ -75,10 +84,12 @@
         }
 
       } else {
-        if (bundle.getCloseConnection()) {
-          OBDal.getInstance().commitAndClose();
-        } else {
-          bundle.getConnection().releaseCommitConnection(bundle.getConnection().getConnection());
+        if (isDoCommit()) {
+          if (bundle.getCloseConnection()) {
+            OBDal.getInstance().commitAndClose();
+          } else {
+            bundle.getConnection().releaseCommitConnection(bundle.getConnection().getConnection());
+          }
         }
 
       }