details:   https://code.openbravo.com/erp/devel/pi/rev/a0b174f8868b
changeset: 20816:a0b174f8868b
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Mon Jul 29 18:38:58 2013 +0200
summary:   Related to Issue 24429. Apply Code Review changes.

diffstat:

 src/org/openbravo/erpCommon/ReportsUtility.java                |  10 +++++-----
 src/org/openbravo/erpCommon/ad_reports/CustomerStatement.jrxml |   2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r 7d4bc46ee3a1 -r a0b174f8868b 
src/org/openbravo/erpCommon/ReportsUtility.java
--- a/src/org/openbravo/erpCommon/ReportsUtility.java   Mon Jul 29 17:47:32 
2013 +0530
+++ b/src/org/openbravo/erpCommon/ReportsUtility.java   Mon Jul 29 18:38:58 
2013 +0200
@@ -40,8 +40,8 @@
 
 public class ReportsUtility {
 
-  public static BigDecimal getBeginingBalance(String orgId, String 
acctSchemaId, String bpartnerId,
-      String dateFrom) {
+  public static BigDecimal getBeginningBalance(String orgId, String 
acctSchemaId,
+      String bpartnerId, String dateFrom) {
     if (dateFrom == null || "".equals(dateFrom)) {
       return BigDecimal.ZERO;
     }
@@ -65,9 +65,9 @@
     projections.add(Projections.sum(AccountingFact.PROPERTY_CREDIT));
     obc.setProjection(projections);
 
-    if (obc.list() != null && obc.list().size() > 0) {
-      @SuppressWarnings("rawtypes")
-      List o = obc.list();
+    @SuppressWarnings("rawtypes")
+    List o = obc.list();
+    if (o != null && o.size() > 0) {
       Object[] resultSet = (Object[]) o.get(0);
       BigDecimal debit = (resultSet[0] != null) ? (BigDecimal) resultSet[0] : 
BigDecimal.ZERO;
       BigDecimal credit = (resultSet[1] != null) ? (BigDecimal) resultSet[1] : 
BigDecimal.ZERO;
diff -r 7d4bc46ee3a1 -r a0b174f8868b 
src/org/openbravo/erpCommon/ad_reports/CustomerStatement.jrxml
--- a/src/org/openbravo/erpCommon/ad_reports/CustomerStatement.jrxml    Mon Jul 
29 17:47:32 2013 +0530
+++ b/src/org/openbravo/erpCommon/ad_reports/CustomerStatement.jrxml    Mon Jul 
29 18:38:58 2013 +0200
@@ -138,7 +138,7 @@
                <variableExpression><![CDATA[$F{date}]]></variableExpression>
        </variable>
        <variable name="initialBalance" class="java.math.BigDecimal">
-               
<variableExpression><![CDATA[ReportsUtility.getBeginingBalance($P{AD_Org_ID}, 
$P{C_AcctSchema_ID}, $P{C_BPartner_ID}, $P{DateFrom})]]></variableExpression>
+               
<variableExpression><![CDATA[ReportsUtility.getBeginningBalance($P{AD_Org_ID}, 
$P{C_AcctSchema_ID}, $P{C_BPartner_ID}, $P{DateFrom})]]></variableExpression>
        </variable>
        <variable name="balance" class="java.math.BigDecimal">
                
<variableExpression><![CDATA[$V{initialBalance}.add($V{SUM})]]></variableExpression>

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to