This is an automated email from the git hooks/post-receive script. New commit to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 189a555de26b9bea6d81d9bcba706803c3ad0cb7 Author: dcosse <japbiw74> Date: Fri Feb 6 16:59:11 2015 +0100 refs #769 fix in case of no identity is provided --- .../lima/business/ejb/report/BalanceReportServiceImpl.java | 3 ++- .../ejb/report/GeneralEntryBookReportServiceImpl.java | 3 ++- .../lima/business/ejb/report/LedgerReportServiceImpl.java | 4 +++- .../ejb/report/ProvisionalEntryBookReportServiceImpl.java | 3 ++- .../lima/web/action/{balance => }/ReportBuilder.java | 2 +- .../lima/web/{action => service}/DocumentService.java | 14 ++++++++------ .../org/chorem/lima/web/service/HttpServerService.java | 3 +-- .../test/java/org/chorem/lima/web/action/ReportTest.java | 1 + 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index 46606f2..671ce09 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -99,7 +99,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal documentReport.setFormatter(bigDecimalFormat); Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(identity.getName()); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setCompanyName(companyName); // general info about balance report documentReport.setTitle(TITLE); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java index ff77565..4d3fbeb 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java @@ -81,7 +81,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(identity.getName()); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setCompanyName(companyName); // general infos about balance report documentReport.setTitle(TITLE); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java index b973893..3b9fe11 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java @@ -70,7 +70,9 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg result.setTitle(TITLE); Identity identity = identityService.getIdentity(); - result.setCompanyName(identity.getName()); + String companyName = identity == null ? "" : identity.getName(); + result.setCompanyName(companyName); + result.setSubReportPath(generalLedgerReportModelPath); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java index 51956d5..b396105 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java @@ -81,7 +81,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(identity.getName()); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setCompanyName(companyName); // general infos about balance report documentReport.setTitle(TITLE); diff --git a/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java b/lima-web/src/main/java/org/chorem/lima/web/action/ReportBuilder.java similarity index 98% rename from lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java rename to lima-web/src/main/java/org/chorem/lima/web/action/ReportBuilder.java index a7cf255..df16484 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/balance/ReportBuilder.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/ReportBuilder.java @@ -1,4 +1,4 @@ -package org.chorem.lima.web.action.balance; +package org.chorem.lima.web.action; /* * #%L diff --git a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java b/lima-web/src/main/java/org/chorem/lima/web/service/DocumentService.java similarity index 99% rename from lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java rename to lima-web/src/main/java/org/chorem/lima/web/service/DocumentService.java index 4fcf5a7..9650726 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/service/DocumentService.java @@ -20,14 +20,13 @@ * #L% */ -package org.chorem.lima.web.action; +package org.chorem.lima.web.service; import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; -import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.FinancialStatementAmounts; import org.chorem.lima.beans.ReportsDatas; @@ -45,13 +44,11 @@ import org.chorem.lima.business.api.report.GeneralEntryBookReportService; import org.chorem.lima.business.api.report.LedgerReportService; import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; import org.chorem.lima.business.utils.BigDecimalToString; -import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; -import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.Identity; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.web.action.balance.ReportBuilder; +import org.chorem.lima.web.action.ReportBuilder; import org.chorem.lima.web.utils.DocumentsEnum; import javax.swing.*; @@ -59,7 +56,6 @@ import java.io.File; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Collections; import java.util.Date; import java.util.List; @@ -126,6 +122,12 @@ public class DocumentService { } + /** + * General Leger + * @param beginDate + * @param endDate + * @return + */ public String createFinancialStatementsDocuments(Date beginDate, Date endDate) { diff --git a/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java b/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java index 65b69f5..8f9d349 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java @@ -34,8 +34,7 @@ import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.Account; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.web.action.DocumentService; -import org.chorem.lima.web.action.balance.ReportBuilder; +import org.chorem.lima.web.action.ReportBuilder; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; diff --git a/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java b/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java index a737087..159cc52 100644 --- a/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java +++ b/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java @@ -23,6 +23,7 @@ package org.chorem.lima.web.action; */ import net.sf.jasperreports.engine.JRException; +import org.chorem.lima.web.service.DocumentService; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.