details:   https://code.openbravo.com/erp/devel/pi/rev/70dd176270f0
changeset: 26098:70dd176270f0
user:      Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
date:      Mon Feb 16 18:10:06 2015 +0100
summary:   Fixes issue 28507: Error shown when posting a reconciliation

When posting a reconciliation with a payment with a payment method not included 
in the financial account, a warning message will be shown instead of an error 
message, saying "Documemt disabled for accounting"

diffstat:

 src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r becbc7144120 -r 70dd176270f0 
src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java    Thu Feb 
26 11:26:38 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java    Mon Feb 
16 18:10:06 2015 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -1186,6 +1186,10 @@
           obCriteria.setFilterOnReadableClients(false);
           obCriteria.setFilterOnReadableOrganization(false);
           List<FinAccPaymentMethod> lines = obCriteria.list();
+          if (lines.isEmpty()) {
+            setStatus(STATUS_DocumentDisabled);
+            return false;
+          }
           for (FIN_FinancialAccountAccounting account : accounts) {
             if (payment.isReceipt()) {
               if (("INT").equals(lines.get(0).getINUponClearingUse())

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to