branch feature/1241-account-report created (now 92fe79e)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git at 92fe79e refs #1241 gérération des rapport de compte avec Jasper This branch includes the following new commits: new 84f9f52 refs #1241 gérération des rapport de compte avec Jasper new 92fe79e refs #1241 gérération des rapport de compte avec Jasper The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 92fe79e1601fee1dc82f672634718f313ba94ff6 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:53:48 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper 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 -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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>.
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 92fe79e1601fee1dc82f672634718f313ba94ff6 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:53:48 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper --- .../jasperreports/account/AccountEntry.jrxml | 247 ++++++++++++++++++ .../jasperreports/account/DocumentReport.jrxml | 288 +++++++++++++++++++++ 2 files changed, 535 insertions(+) diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml new file mode 100644 index 0000000..319105e --- /dev/null +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-06-27T00:41:06 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="31" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff [...] + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> + <style name="Default" isDefault="true" fontName="DejaVu Sans"/> + <style name="Default oblique" fontName="DejaVu Sans Mono"/> + <field name="accountNumber" class="java.lang.String"/> + <field name="transactionDate" class="java.util.Date"/> + <field name="code" class="java.lang.String"/> + <field name="voucher" class="java.lang.String"/> + <field name="description" class="java.lang.String"/> + <field name="lettering" class="java.lang.String"/> + <field name="debit" class="java.math.BigDecimal"/> + <field name="credit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="subTotalCredit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="84" height="10" uuid="3df46955-605d-424c-a464-3096d7e231f4"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="84" y="0" width="62" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{transactionDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="146" y="0" width="36" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{code}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="182" y="0" width="108" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="0" width="108" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="398" y="0" width="36" height="10" uuid="961e8048-c6ef-4b58-a857-31f9f29406c8"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"> + <font size="8" isBold="false"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{lettering}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{credit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{credit}) : ""]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement x="0" y="0" width="578" height="10" uuid="5863f40f-6423-4463-ad4a-c4cecab0323c"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <font size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{subTotalCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalCredit}) : ""]]></textFieldExpression> + </textField> + <textField> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <font size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{subTotalDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalDebit}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </columnFooter> +</jasperReport> diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml new file mode 100644 index 0000000..6b60042 --- /dev/null +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -0,0 +1,288 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-06-27T00:11:53 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> + <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="fromDate" class="java.util.Date"/> + <field name="toDate" class="java.util.Date"/> + <field name="currency" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="companyName" class="java.lang.String"/> + <field name="title" class="java.lang.String"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> + </variable> + <group name="accounts"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="41" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{title}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> + <reportElement style="Default" x="444" y="0" width="134" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph rightIndent="5"/> + </textElement> + <textFieldExpression><![CDATA["Edition du: " + new SimpleDateFormat("dd/MM/yyyy à HH:mm").format(new java.util.Date())]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="80" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA["Du " + new SimpleDateFormat("dd/MM/yyyy").format($F{fromDate})]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="20" width="80" height="20" forecolor="#736343" uuid="5fc4df4a-5930-4ccd-b450-cf7aac6be57b"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[" au " + new SimpleDateFormat("dd/MM/yyyy").format($F{toDate})]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="10" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="45" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="9" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> + </textField> + </band> + </pageHeader> + <columnHeader> + <band height="20"> + <frame> + <reportElement style="Column header" mode="Opaque" x="0" y="0" width="578" height="20" backcolor="#FDCA97" uuid="6c2c2b44-eebf-41d3-8b56-47d4a20a4b24"> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <staticText> + <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="84" height="20" forecolor="#804000" backcolor="#FFFFFF" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[N° Compte]]></text> + </staticText> + <staticText> + <reportElement x="84" y="0" width="62" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Date]]></text> + </staticText> + <staticText> + <reportElement x="146" y="0" width="36" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Journal]]></text> + </staticText> + <staticText> + <reportElement x="182" y="0" width="108" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Pièce comptable]]></text> + </staticText> + <staticText> + <reportElement x="290" y="0" width="108" height="20" forecolor="#804000" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Description]]></text> + </staticText> + <staticText> + <reportElement x="398" y="0" width="36" height="20" forecolor="#804000" uuid="f0c1ae81-733f-42ba-844d-082b51c95040"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Lettre]]></text> + </staticText> + <staticText> + <reportElement x="434" y="0" width="72" height="20" forecolor="#804000" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement x="506" y="0" width="72" height="20" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineColor="#804000"/> + <leftPen lineColor="#804000"/> + <bottomPen lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="20" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> + </subreport> + </band> + </detail> + <pageFooter> + <band height="10" splitType="Stretch"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="0" width="288" height="10" uuid="7efdc24b-643b-4927-89e5-30edca53124f"/> + <textElement textAlignment="Right"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement x="288" y="0" width="287" height="10" uuid="78cfa3db-28e7-420e-b2e4-441f37387159"/> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </pageFooter> +</jasperReport> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm