This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 84f9f5205905242198f91e49b2bfef9ebdb8e81a Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:52:55 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper --- .../business/api/report/AccountReportService.java | 46 +++++++++ .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../ejb/report/AccountReportServiceImpl.java | 109 +++++++++++++++++++++ lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57316 -> 57764 bytes .../chorem/lima/report/DocumentReportTypes.java | 1 + .../org/chorem/lima/report/LimaReportConfig.java | 38 +++---- .../lima/report/service/DocumentService.java | 95 +++--------------- .../chorem/lima/report/service/JasperReports.java | 10 ++ 8 files changed, 202 insertions(+), 99 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java new file mode 100644 index 0000000..b6a29c9 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java @@ -0,0 +1,46 @@ +package org.chorem.lima.business.api.report; + +/* + * #%L + * Lima :: business API + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JasperReport; +import org.chorem.lima.beans.DocumentReport; + +import java.text.DecimalFormat; +import java.util.Date; + +/** + * Created by davidcosse on 26/26/15. + */ +public interface AccountReportService { + + /** + * Generate the necessary beans to make account report. + * + * @param account requested account + * @param from from date + * @param to to date + * @param bigDecimalFormat format used for amount representation + * @return model for account report + */ + DocumentReport getAccountDocumentReport(String account, Date from, Date to, JasperReport accountsJasperReport, DecimalFormat bigDecimalFormat); +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java index 241cae1..e1dcccb 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java @@ -23,7 +23,7 @@ package org.chorem.lima.business.ejb.csv; */ import com.google.common.collect.Maps; -import org.chorem.lima.beans.Account; +import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialTransaction; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java new file mode 100644 index 0000000..8251a9a --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -0,0 +1,109 @@ +package org.chorem.lima.business.ejb.report; + +import net.sf.jasperreports.engine.JasperReport; +import org.apache.commons.collections4.CollectionUtils; +import org.chorem.lima.beans.AccountEntry; +import org.chorem.lima.beans.AccountEntryImpl; +import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.DocumentReportImpl; +import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.report.AccountReportService; +import org.chorem.lima.business.ejb.AbstractLimaService; +import org.chorem.lima.entity.Account; +import org.chorem.lima.entity.AccountTopiaDao; +import org.chorem.lima.entity.Entry; +import org.chorem.lima.entity.Identity; + +import javax.ejb.EJB; +import javax.ejb.Remote; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +/** + * Created by davidcosse on 26/06/15. + */ +@Stateless +@Remote(AccountReportService.class) +@TransactionAttribute +public class AccountReportServiceImpl extends AbstractLimaService implements AccountReportService { + + protected static final String TITLE = "COMPTE"; + + @EJB + protected IdentityService identityService; + @EJB + protected ReportService reportService; + + @Override + public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { + + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setFormatter(bigDecimalFormat); + + Identity identity = identityService.getIdentity(); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setCompanyName(companyName); + + // general info about balance report + documentReport.setTitle(TITLE); + documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); + documentReport.setFromDate(from); + documentReport.setToDate(to); + documentReport.setSubReport(accountsEntryJasperReport); + + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + + if (from != null && to != null && account != null) { + + Collection<AccountEntry> accountEntries = new ArrayList<>(); + + ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); + List<Entry> entries = results.getListEntry(); + + if (CollectionUtils.isNotEmpty(entries)) { + for (Entry entry : entries) { + + if (entry.getAmount() == null || BigDecimal.ZERO.equals(entry.getAmount())) { + continue; + } + + String entryAccountNumber = entry.getAccount().getAccountNumber(); + String code = ""; + if (entry.getFinancialTransaction().getEntryBook() != null) { + code = entry.getFinancialTransaction().getEntryBook().getCode(); + } + + AccountEntry accountEntry = new AccountEntryImpl(); + accountEntry.setAccountNumber(entryAccountNumber); + accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); + accountEntry.setCode(code); + accountEntry.setVoucher(entry.getVoucher()); + accountEntry.setDescription(entry.getDescription()); + accountEntry.setLettering(entry.getLettering()); + accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); + accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); + accountEntry.setFormatter(bigDecimalFormat); + accountEntries.add(accountEntry); + } + } + + documentReport.addAllAccounts(accountEntries); + + } else { + if (log.isWarnEnabled()) { + log.warn("No account present"); + } + } + + return documentReport; + } +} diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 2b9a7e5..659fb03 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java b/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java index cbc142d..6dafd4c 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java +++ b/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java @@ -28,6 +28,7 @@ package org.chorem.lima.report; */ public enum DocumentReportTypes { ACCOUNT, + ACCOUNT_ENTRY, BALANCE, BALANCE_MAIN_ACCOUNTS, BALANCE_SUB_ACCOUNTS, diff --git a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java index bfb438f..00b00b8 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java +++ b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java @@ -146,56 +146,59 @@ public class LimaReportConfig { } public URL getReportModelUrl(DocumentReportTypes documentType) { - URL mainReportBuilderPath = null; + URL jasperSourceFileUrl = null; switch (documentType) { case ACCOUNT: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); + break; + case ACCOUNT_ENTRY: + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ACCOUNT_ENTRY_REPORT_MODEL_PATH.getKey()); break; case BALANCE: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key); break; case BALANCE_MAIN_ACCOUNTS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key); break; case BALANCE_SUB_ACCOUNTS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_FINANCIAL_PERIODS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_TRANSACTION: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK_ENTRIES: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key); break; case LEDGER: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.key); break; case LEDGER_GENERAL_LEDGERS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_MODEL_PATH.key); break; case LEDGER_ENTRIES: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_ENTRY_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_ENTRY_MODEL_PATH.key); break; } - return mainReportBuilderPath; + return jasperSourceFileUrl; } public void setBalanceDocumentReportModelPath(String path) { @@ -334,7 +337,8 @@ public class LimaReportConfig { REPORTS_MODEL_DIR("lima.reports.dir",n("lima.config.reports.dir.description"),"${lima.data.dir}/reports", File.class, false, false), - ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", n("lima.config.documentReport.account.documentReportModelPath.description"), "/jasperreports/accounts/DocumentReport.jrxml",String.class, false, false), + ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", n("lima.config.documentReport.account.documentReportModelPath.description"), "/jasperreports/account/DocumentReport.jrxml",String.class, false, false), + ACCOUNT_ENTRY_REPORT_MODEL_PATH("lima.config.documentReport.account.accountEntryReportModelPath", n("lima.config.documentReport.account.accountEntryReportModelPath.description"), "/jasperreports/account/AccountEntry.jrxml",String.class, false, false), BALANCE_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.balance.documentReportModelPath", n("lima.config.documentReport.balance.documentReportModelPath.description"), "/jasperreports/balance/DocumentReport.jrxml", String.class, false, false), BALANCE_ACCOUNT_REPORT_MODEL_PATH("lima.config.documentReport.balance.balanceAccountReportModelPath", n("lima.config.documentReport.balance.balanceAccountReportModelPath.description"), "/jasperreports/balance/BalanceReportAccountReport.jrxml", String.class, false, false), diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index dea0e41..4821c7f 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -31,20 +31,18 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.FinancialStatementAmounts; -import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.OptionsService; -import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.report.AccountReportService; import org.chorem.lima.business.api.report.BalanceReportService; 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.entity.Account; -import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.Identity; import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; @@ -56,7 +54,6 @@ import java.io.InputStream; import java.math.BigDecimal; import java.net.URL; import java.text.DecimalFormat; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -72,7 +69,7 @@ public class DocumentService { private FinancialStatementService financialStatementService; - private ReportService reportService; + protected AccountReportService accountReportService; protected BalanceReportService balanceReportService; @@ -86,6 +83,7 @@ public class DocumentService { protected JasperReports jasperReports; + protected String accountFilePath; protected String balanceFilePath; protected String generalEntryBookReportPdfFilePath; protected String entryBooksReportPdfFilePath; @@ -94,9 +92,9 @@ public class DocumentService { public DocumentService() { identityService = LimaServiceFactory.getService(IdentityService.class); financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); - reportService = LimaServiceFactory.getService(ReportService.class); accountService = LimaServiceFactory.getService(AccountService.class); + accountReportService = LimaServiceFactory.getService(AccountReportService.class); balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); @@ -116,6 +114,7 @@ public class DocumentService { String reportDirPath = reportDir.getAbsolutePath(); + accountFilePath = reportDirPath + File.separator + DocumentsEnum.ACCOUNT.getFileName() + ".pdf"; balanceFilePath = reportDirPath + File.separator + DocumentsEnum.BALANCE.getFileName() + ".pdf"; generalEntryBookReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.GENERAL_ENTRY_BOOK.getFileName() + ".pdf"; entryBooksReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.ENTRY_BOOKS.getFileName() + ".pdf"; @@ -338,80 +337,6 @@ public class DocumentService { // } - public String createAccountDocument(Date beginDate, Date endDate, String account) { - - String accountReport; - - try { - - Account accountFormat = accountService.findAccountById(account); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); - - accountReport = constructHtmlHeader(t("lima.reports.accounts")); - - ReportsDatas results; - - if (beginDate != null && endDate != null && accountFormat != null) { - - String subTitleFirstpart = t("lima.fiscalperiod.fiscalperiod") + " : " + simpleDateFormat.format(beginDate) + " - " + simpleDateFormat.format(endDate); - String subTitleSecPart = t("lima.financialtransaction.account") + " : " + accountFormat.getAccountNumber() + " - " + accountFormat.getLabel(); - accountReport += constructSubTitleHtml(subTitleFirstpart, subTitleSecPart); - - results = reportService.generateAccountsReports(accountFormat, true, - beginDate, endDate); - List<Entry> entries = results.getListEntry(); - - String[] columnNames = {t("lima.table.number"), t("lima.table.date"), t("lima.table.entryBook"), - t("lima.table.voucher"), t("lima.table.description"), t("lima.table.letter"), - t("lima.table.debit"), t("lima.table.credit")}; - - accountReport += "\t<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n"; - - accountReport += constructTableHeader(columnNames); - accountReport += "\t\t<tbody>\n"; - - boolean even = true; - for (Entry entry : entries) { - - String accountNumber = entry.getAccount().getAccountNumber(); - String transactionDate = simpleDateFormat.format(entry.getFinancialTransaction().getTransactionDate()); - String code = ""; - if (entry.getFinancialTransaction().getEntryBook() != null) { - code = entry.getFinancialTransaction().getEntryBook().getCode(); - } - String voucher = entry.getVoucher(); - String description = entry.getDescription(); - String lettering = entry.getLettering(); - - - String[] columnData = {(StringUtils.isBlank(accountNumber) ? "" : accountNumber), (StringUtils.isBlank(transactionDate) ? "" : transactionDate), - (StringUtils.isBlank(code) ? "" : code), (StringUtils.isBlank(voucher) ? "" : voucher), - (StringUtils.isBlank(description) ? "" : description), (StringUtils.isBlank(lettering) ? "" : lettering), - (entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO).toString(), - (entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()).toString()}; - - accountReport += constructTableLine(columnData, even); - even = !even; - } - - accountReport += "\t\t</tbody>\n\t</table>\n" + - "</body>\n"; - - } else { - if (log.isWarnEnabled()) { - log.warn("No account present"); - } - } - - accountReport += "</html>"; - - } catch (Exception e) { - throw new LimaTechnicalException("Can't create document", e); - } - - return accountReport; - } - protected String constructHtmlHeader(String title) { String head = "<!DOCTYPE html>\n" + "<html>\n" + @@ -543,6 +468,14 @@ public class DocumentService { return result; } + //############## account ############## + public void createAccountDocument(String account, Date beginDate, Date endDate) { + JasperReport acountEntryReport = jasperReports.getAccountEntryReport(); + DocumentReport report = accountReportService.getAccountDocumentReport(account, beginDate, endDate, acountEntryReport, getDecimalFormat()); + jasperReports.generatePDFReport(DocumentsEnum.ACCOUNT, accountFilePath, Lists.newArrayList(report)); + } + + //############## balance ############## public void createBalanceDocuments(Date beginDate, Date endDate, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); @@ -601,7 +534,7 @@ public class DocumentService { createBalanceDocuments(beginDate, endDate, null); break; case ACCOUNT: - stringResult = createAccountDocument(beginDate, endDate, account); + createAccountDocument(account, beginDate, endDate); break; case ENTRY_BOOKS: createEntryBooksDocuments(beginDate, endDate, null); diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java b/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java index 7674e09..2a1242d 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java @@ -52,6 +52,9 @@ public class JasperReports { private static final Log log = LogFactory.getLog(JasperReports.class); + protected JasperReport accountDocumentReport; + protected JasperReport accountEntryReport; + protected JasperReport balanceDocumentReport; protected JasperReport balanceManAccountsReport; protected JasperReport balanceSubAccountsReport; @@ -79,6 +82,9 @@ public class JasperReports { LimaReportConfig config = LimaReportConfig.getInstance(); // compile phase + accountDocumentReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.ACCOUNT)); + accountEntryReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.ACCOUNT_ENTRY)); + balanceDocumentReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE)); balanceManAccountsReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE_MAIN_ACCOUNTS)); balanceSubAccountsReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE_SUB_ACCOUNTS)); @@ -97,6 +103,7 @@ public class JasperReports { generalLedgerEntriesReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.LEDGER_ENTRIES)); reportsByDocumentType = Maps.newHashMap(); + reportsByDocumentType.put(DocumentsEnum.ACCOUNT, accountDocumentReport); reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceDocumentReport); reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRY_BOOK, generalEntryBookDocumentReport); reportsByDocumentType.put(DocumentsEnum.ENTRY_BOOKS, entryBookDocumentReport); @@ -139,6 +146,9 @@ public class JasperReports { } + public JasperReport getAccountEntryReport() { + return accountEntryReport; + } public JasperReport getBalanceManAccountsReport() { return balanceManAccountsReport; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.