Related to 25483: Code Reformatting
authorPandeeswari Ramakrishnan <pandeeswari.ramakrishnan@openbravo.com>
Mon, 07 Apr 2014 15:11:15 +0530
changeset 22879 97d8cf3e7d76
parent 22878 e3ae82ec9ee3
child 22880 d80df926f9ba
Related to 25483: Code Reformatting
src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Mon Apr 07 00:47:11 2014 +0530
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Mon Apr 07 15:11:15 2014 +0530
@@ -65,9 +65,8 @@
       obc.add(Restrictions.in("organization.id", OBContext.getOBContext()
           .getOrganizationStructureProvider().getNaturalTree(strOrgId)));
 
-      if (obc.count() > 0) {
-        FinAccPaymentMethod selectedAccPaymentMethod = obc.list().get(0);
-
+      FinAccPaymentMethod selectedAccPaymentMethod = (FinAccPaymentMethod) obc.uniqueResult();
+      if (selectedAccPaymentMethod != null) {
         if (isPaymentOut) {
           isMultiCurrencyEnabled = selectedAccPaymentMethod.isPayoutAllow()
               && selectedAccPaymentMethod.isPayoutIsMulticurrency();