branch feature/newReportBuilder updated (b82fc56 -> 988f41d)
This is an automated email from the git hooks/post-receive script. New change to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git from b82fc56 refs #769 uniformasation des thèmes new 4e1051d refs #769 path for generating report can be set through config file, it allows user to set it's own report builder file new 801d27a refs #769 String -> Bigdecimal when there are numeric account values new c34e00d refs #769 set BigDecimal format for general entry book report new d93ebd0 refs #769 fix Balance report fill-up new d7a7b32 refs #769 Mise à jour des rapports new 8138d5b refs #769 services for Leger report new 988f41d refs #769 Leger report generation The 7 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 988f41d4b632ca207d60b07209b8f563e5d2f1b1 Author: dcosse <japbiw74> Date: Fri Jan 23 00:05:08 2015 +0100 refs #769 Leger report generation commit 8138d5b0ebff1c6296cdad4320fcb50b7843c1e2 Author: dcosse <japbiw74> Date: Thu Jan 22 18:12:42 2015 +0100 refs #769 services for Leger report commit d7a7b32a38f4943674ab3bd14b50b662108dcdeb Author: dcosse <japbiw74> Date: Wed Jan 21 14:39:42 2015 +0100 refs #769 Mise à jour des rapports commit d93ebd03805fae66175b55c2a9ac113cceab349e Author: dcosse <japbiw74> Date: Wed Jan 14 16:00:56 2015 +0100 refs #769 fix Balance report fill-up commit c34e00d99d068643a358dcf1249d59220e240619 Author: dcosse <japbiw74> Date: Wed Jan 14 15:12:07 2015 +0100 refs #769 set BigDecimal format for general entry book report commit 801d27a13893e4b6ffbae60bbd465d520319278d Author: dcosse <japbiw74> Date: Wed Jan 14 15:00:57 2015 +0100 refs #769 String -> Bigdecimal when there are numeric account values commit 4e1051d71b1d4a96e5c6403889563029e86fd65d Author: dcosse <japbiw74> Date: Tue Jan 13 16:05:08 2015 +0100 refs #769 path for generating report can be set through config file, it allows user to set it's own report builder file Summary of changes: .../chorem/lima/business/api/OptionsService.java | 33 +- .../business/api/report/BalanceReportService.java | 3 +- .../api/report/GeneralEntryBookReportService.java | 3 +- .../business/api/report/LedgerReportService.java | 21 + .../report/ProvisionalEntryBookReportService.java | 5 +- .../chorem/lima/business/LimaServiceConfig.java | 241 +++++++++- .../lima/business/ejb/OptionsServiceImpl.java | 80 +++- .../lima/business/ejb/ReportServiceImpl.java | 1 - .../ejb/report/BalanceReportServiceImpl.java | 102 +++-- .../report/GeneralEntryBookReportServiceImpl.java | 62 +-- .../ejb/report/LedgerReportServiceImpl.java | 141 ++++++ .../ProvisionalEntryBookReportServiceImpl.java | 79 ++-- .../lima/business/utils}/BigDecimalToString.java | 38 +- .../resources/i18n/lima-business_en_GB.properties | 14 + .../resources/i18n/lima-business_fr_FR.properties | 19 + .../lima/business/EntryBookServiceImplTest.java | 9 +- .../org/chorem/lima/beans/BalanceAccountImpl.java | 54 +++ .../lima/beans/BalanceReportAccountImpl.java | 63 --- .../java/org/chorem/lima/entity/EntryTopiaDao.java | 2 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 51917 -> 56954 bytes .../src/main/java/org/chorem/lima/LimaMain.java | 20 + .../main/java/org/chorem/lima/LimaSwingConfig.java | 158 ++++++- .../org/chorem/lima/util/BigDecimalToString.java | 9 +- .../resources/i18n/lima-swing_en_GB.properties | 15 + .../resources/i18n/lima-swing_fr_FR.properties | 21 + lima-web/src/main/assembly/bin.xml | 35 ++ .../jasperreports/accounts/AccountReport.jrxml | 161 ------- .../main/jasperreports/balance/BalanceReport.jrxml | 275 ------------ .../balance/BalanceReportAccountReport.jrxml | 163 ++----- .../balance/BalanceSubAccountsReport.jrxml | 488 ++++++++++++++++----- .../DocumentReport.jrxml} | 199 +++------ .../DocumentReport.jrxml} | 25 +- .../EntryBookReport.jrxml | 83 ++-- .../FinancialPeriodReport.jrxml | 214 ++++----- .../entryBook/TransactionReport.jrxml | 297 +++++++++++++ .../DocumentReport.jrxml} | 86 +--- .../generalEntryBook/EntryBookMainReport.jrxml | 319 -------------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 279 ++++++------ .../GeneralEntryBookEntryReport.jrxml | 157 +++---- .../provisionalEntryBook/Transaction.jrxml | 124 ------ .../chorem/lima/web/action/DocumentService.java | 315 ++++--------- .../lima/web/action/balance/ReportBuilder.java | 28 +- .../chorem/lima/web/service/HttpServerService.java | 26 +- 43 files changed, 2291 insertions(+), 2176 deletions(-) create mode 100644 lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java copy {lima-swing/src/main/java/org/chorem/lima/util => lima-business/src/main/java/org/chorem/lima/business/utils}/BigDecimalToString.java (55%) create mode 100644 lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java delete mode 100644 lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java delete mode 100644 lima-web/src/main/jasperreports/accounts/AccountReport.jrxml delete mode 100644 lima-web/src/main/jasperreports/balance/BalanceReport.jrxml copy lima-web/src/main/jasperreports/{provisionalEntryBook/EntryBookMainReport.jrxml => balance/DocumentReport.jrxml} (61%) copy lima-web/src/main/jasperreports/{provisionalEntryBook/EntryBookMainReport.jrxml => entryBook/DocumentReport.jrxml} (94%) rename lima-web/src/main/jasperreports/{provisionalEntryBook => entryBook}/EntryBookReport.jrxml (61%) rename lima-web/src/main/jasperreports/{provisionalEntryBook => entryBook}/FinancialPeriodReport.jrxml (68%) create mode 100644 lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml rename lima-web/src/main/jasperreports/{provisionalEntryBook/EntryBookMainReport.jrxml => generalEntryBook/DocumentReport.jrxml} (80%) delete mode 100644 lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml delete mode 100644 lima-web/src/main/jasperreports/provisionalEntryBook/Transaction.jrxml -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 4e1051d71b1d4a96e5c6403889563029e86fd65d Author: dcosse <japbiw74> Date: Tue Jan 13 16:05:08 2015 +0100 refs #769 path for generating report can be set through config file, it allows user to set it's own report builder file --- .../chorem/lima/business/api/OptionsService.java | 33 ++- .../business/api/report/LedgerReportService.java | 20 ++ .../report/ProvisionalEntryBookReportService.java | 5 +- .../chorem/lima/business/LimaServiceConfig.java | 191 +++++++++++-- .../lima/business/ejb/OptionsServiceImpl.java | 80 +++++- .../ejb/report/BalanceReportServiceImpl.java | 9 +- .../report/GeneralEntryBookReportServiceImpl.java | 13 +- .../ejb/report/LedgerReportServiceImpl.java | 143 ++++++++++ .../ProvisionalEntryBookReportServiceImpl.java | 45 ++-- .../lima/business/utils}/BigDecimalToString.java | 38 +-- .../resources/i18n/lima-business_en_GB.properties | 1 + .../resources/i18n/lima-business_fr_FR.properties | 6 + .../java/org/chorem/lima/entity/EntryTopiaDao.java | 2 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 51917 -> 53857 bytes .../src/main/java/org/chorem/lima/LimaMain.java | 20 ++ .../main/java/org/chorem/lima/LimaSwingConfig.java | 157 ++++++++++- .../org/chorem/lima/util/BigDecimalToString.java | 9 +- .../resources/i18n/lima-swing_en_GB.properties | 4 + .../resources/i18n/lima-swing_fr_FR.properties | 4 + .../provisionalEntryBook/EntryBookMainReport.jrxml | 6 +- .../provisionalEntryBook/EntryBookReport.jrxml | 74 ++--- .../FinancialPeriodReport.jrxml | 203 +++++++------- .../provisionalEntryBook/Transaction.jrxml | 124 --------- .../provisionalEntryBook/TransactionReport.jrxml | 297 +++++++++++++++++++++ .../chorem/lima/web/action/DocumentService.java | 169 ++++++------ .../lima/web/action/balance/ReportBuilder.java | 12 +- .../chorem/lima/web/service/HttpServerService.java | 24 +- 27 files changed, 1246 insertions(+), 443 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java index 882dab0..80a14c9 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java @@ -5,16 +5,16 @@ * Copyright (C) 2008 - 2011 CodeLutin * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as + * it under the terms of the GNU General 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. + * GNU General License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU General * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% @@ -48,4 +48,31 @@ public interface OptionsService { */ int getScale(); + void setReportsDir(String url); + + void setAccountReportPath(String path); + + void setBalanceReportPath(String path); + + void setBalanceReportAccountReportPath(String path); + + void setBalanceSubAccountReportPath(String path); + + void setGeneralEntryBookEntryBookMainReportPath(String path); + + void setGeneralEntryBookPeriodReportPath(String path); + + void setGeneralEntryBookGeneralEntryBookReportPath(String path); + + void setProvisionalEntryBookEntryBookMainReportPath(String path); + + void setProvisionalEntryBookEntryBookReportPath(String path); + + void setProvisionalEntryBookFinancialPeriodReportPath(String path); + + void setProvisionalEntryBookTransactionReportPath(String path); +// void setBigDecimalFormat(String format); +// +// String getBigDecimalFormat(); + } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java new file mode 100644 index 0000000..f189ce5 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java @@ -0,0 +1,20 @@ +package org.chorem.lima.business.api.report; + +import org.chorem.lima.beans.DocumentReport; + +import java.util.Date; + +/** + * Created by davidcosse on 20/11/14. + */ +public interface LedgerReportService { + + /** + * + * @param beginDate period from + * @param endDate period to + * @param currency current currency + * @return + */ + DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency); +} diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java index 58049bd..dfa1b33 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java @@ -2,8 +2,10 @@ package org.chorem.lima.business.api.report; import org.chorem.lima.beans.DocumentReport; +import java.text.DecimalFormat; import java.util.Date; import java.util.List; +import java.util.Properties; /** * Created by davidcosse on 19/11/14. @@ -11,12 +13,11 @@ import java.util.List; public interface ProvisionalEntryBookReportService { /** - * * @param beginDate period from * @param endDate period to * @param entryBookCodes selected entry books if null all are selected * @param currency current currency * @return */ - DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency); + DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index 032a5b4..1b43a09 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -68,6 +68,8 @@ public class LimaServiceConfig { protected static volatile LimaServiceConfig instance; + protected final static String ROOT_PATH = new File("").getAbsolutePath(); + private LimaServiceConfig(String configFileName) { try { ApplicationConfig defaultConfig = new ApplicationConfig(LIMA_DEFAULT_CONF_FILENAME); @@ -109,7 +111,6 @@ public class LimaServiceConfig { } getInstance().setRootContextProperties(result); - } Properties result = getInstance().rootContextProperties; return result; @@ -195,11 +196,6 @@ public class LimaServiceConfig { return datadir; } - public File getReportsDir() { - File reportsDir = config.getOptionAsFile(ServiceConfigOption.REPORTS_DIR.getKey()); - return reportsDir; - } - public String getAddressServer() { String serverAddress = config.getOption(ServiceConfigOption.SERVER_ADRESS.getKey()); return serverAddress; @@ -211,9 +207,135 @@ public class LimaServiceConfig { return port; } - public String getScale() { - String scale = config.getOption(ServiceConfigOption.SCALE.getKey()); - return scale; + public String getVatPDFUrl() { + String vatPDFUrl = config.getOption(ServiceConfigOption.VAT_PDF_URL.getKey()); + return vatPDFUrl; + } + + public void setVatPDFUrl(String url) { + config.setOption(ServiceConfigOption.VAT_PDF_URL.key, url); + config.saveForUser(); + } + + // ** REPORT PART ** + + public File getReportsDir() { + String reportsDirPath = config.getOption(ServiceConfigOption.REPORTS_DIR.key); + File result = new File(reportsDirPath); + return result; + } + + public void setReportsDir(String url) { + config.setOption(ServiceConfigOption.REPORTS_DIR.key, url); + config.saveForUser(); + } + + public String getAccountReportPath() { + String vatPDFUrl = config.getOption(ServiceConfigOption.ACCOUNT_REPORT_PATH.getKey()); + return vatPDFUrl; + } + + public void setAccountReportPath(String path) { + config.setOption(ServiceConfigOption.ACCOUNT_REPORT_PATH.key, path); + config.saveForUser(); + } + + public String getBalanceReportPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_REPORT_PATH.getKey()); + return result; + } + + public void setBalanceReportPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_REPORT_PATH.key, path); + config.saveForUser(); + } + + public String getBalanceReportAccountReportPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_REPORT_ACCOUNT_REPORT_PATH.getKey()); + return result; + } + + public void setBalanceReportAccountReportPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_REPORT_ACCOUNT_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getBalanceSubAccountReportPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_PATH.getKey()); + return result; + } + + public void setBalanceSubAccountReportPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getGeneralEntryBookEntryBookMainReportPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); + return result; + } + + public void setGeneralEntryBookEntryBookMainReportPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getGeneralEntryBookEntryBookPeriodReportPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.getKey()); + return result; + } + + public void setGeneralEntryBookEntryBookPeriodReportPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.key, path); + config.saveForUser(); + } + + public String getGeneralEntryBookGeneralEntryBookEntryReportPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.getKey()); + return result; + } + + public void setGeneralEntryBookGeneralEntryBookEntryReportPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getProvisionalEntryBookEntryBookMainReportPath() { + String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); + return result; + } + + public void setProvisionalEntryBookEntryBookMainReportPath(String path) { + config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getProvisionalEntryBookEntryBookReportPath() { + String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.getKey()); + return result; + } + + public void setProvisionalEntryBookEntryBookReportPath(String path) { + config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.key, path); + config.saveForUser(); + } + public String getProvisionalEntryBookFinancialPeriodReportPath() { + String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.getKey()); + return result; + } + + public void setProvisionalEntryBookFinancialPeriodReportPath(String path) { + config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.key, path); + config.saveForUser(); + } + + public String getProvisionalEntryBookTransactionReportPath() { + String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.getKey()); + return result; + } + + public void setProvisionalEntryBookTransactionReportPath(String path) { + config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.key, path); + config.saveForUser(); + } + + public int getScale() { + return config.getOptionAsInt(ServiceConfigOption.SCALE.key); } public void setScale(String locale) { @@ -221,16 +343,38 @@ public class LimaServiceConfig { config.saveForUser(); } - public String getVatPDFUrl() { - String vatPDFUrl = config.getOption(ServiceConfigOption.VAT_PDF_URL.getKey()); - return vatPDFUrl; + public boolean getCurrency() { + return config.getOptionAsBoolean(ServiceConfigOption.CURRENCY.key); } - public void setVatPDFUrl(String url) { - config.setOption(ServiceConfigOption.VAT_PDF_URL.key, url); + public void setCurrency(String locale) { + config.setOption(ServiceConfigOption.CURRENCY.key, locale); config.saveForUser(); } + public char getDecimalSeparator() { + char decimalSeparator = config.getOption(ServiceConfigOption.DECIMAL_SEPARATOR.key).charAt(0); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + return decimalSeparator; + } + + public void setDecimalSeparator(String locale) { + config.setOption(ServiceConfigOption.DECIMAL_SEPARATOR.key, locale); + config.saveForUser(); + } + + public char getThousandSeparator() { + return config.getOption(ServiceConfigOption.THOUSAND_SEPARATOR.key).charAt(0); + } + + public void setThousandSeparator(String locale) { + config.setOption(ServiceConfigOption.THOUSAND_SEPARATOR.key, locale); + config.saveForUser(); + } + + // ** FIN REPORT PART ** + + /** * Lima option definition. * <p/> @@ -243,12 +387,27 @@ public class LimaServiceConfig { // CONFIG_FILE(CONFIG_FILE_NAME, n("lima.configFileName.description"), "lima.properties", String.class, true, true), APPLICATION_VERSION("application.version", n("application.version"), null, String.class, false, false), DATA_DIR("lima.data.dir", n("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false), - REPORTS_DIR("lima.reports.dir", n("lima.config.reports.dir.description"), "${lima.data.dir}/reports", File.class, false, false), RULES_NATIONALTY("lima.rules", n("lima.config.rulesnationality.description"), FranceAccountingRules.class.getName(), String.class, false, false), HTTP_PORT("lima.httpport", n("lima.config.httpport.description"), "5462", String.class, false, false), SERVER_ADRESS("lima.serveraddress", n("lima.config.serveraddress.description"), "", String.class, false, false), + VAT_PDF_URL("lima.report.vatpdfurl", n("lima.config.reportvatpdfurl.description"), "default", String.class, false, false), + + REPORTS_DIR("lima.reports.dir",n("lima.config.reports.dir.description"),"${lima.data.dir}/reports", File.class, false, false), + ACCOUNT_REPORT_PATH("lima.accounts.accountReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml",String.class, false, false), + BALANCE_REPORT_PATH("lima.balance.balanceReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml",String.class, false, false), + BALANCE_REPORT_ACCOUNT_REPORT_PATH("lima.balance.balanceReportAccountReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml",String.class, false, false), + BALANCE_SUB_ACCOUNT_REPORT_PATH("lima.balance.balanceSubAccountReportPath",n("lima.config.documentReport.balanceReportAccount.description"), ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml",String.class, false, false), + GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.generalEntryBook.entryBookMainReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml", String.class, false, false), + GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH("lima.generalEntryBook.entryBookPeriodReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml", String.class, false, false), + GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH("lima.generalEntryBook.generalEntryBookEntryReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml", String.class, false, false), + PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.provisionalEntryBook.entryBookMainReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml",String.class,false, false), + PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH("lima.provisionalEntryBook.entryBookReport","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml",String.class,false, false), + PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH("lima.provisionalEntryBook.financialPeriodReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml", String.class, false, false), + PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH("lima.provisionalEntryBook.transactionReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml",String.class, false, false), SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), - VAT_PDF_URL("lima.report.vatpdfurl", n("lima.config.reportvatpdfurl.description"), "default", String.class, false, false); + CURRENCY("lima.config.currency","","false", Boolean.class, false, false), + DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator","",",",Character.class, false, false), + THOUSAND_SEPARATOR("lima.thousandSeparator",""," ",Character.class, false, false); private final String key; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java index 17659f6..772d489 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java @@ -31,7 +31,7 @@ import javax.ejb.Stateless; @Remote(OptionsService.class) public class OptionsServiceImpl extends AbstractLimaService implements OptionsService { - protected String scale; + protected int scale; protected String vatPDFUrl; @@ -41,13 +41,81 @@ public class OptionsServiceImpl extends AbstractLimaService implements OptionsSe } public int getScale() { - if (scale == null || scale.isEmpty()) { - return 2; - } else { - return Integer.valueOf(scale); - } + return scale; } + @Override + public void setReportsDir(String path) { + LimaServiceConfig.getInstance().setReportsDir(path); + } + + @Override + public void setAccountReportPath(String path) { + LimaServiceConfig.getInstance().setAccountReportPath(path); + } + + @Override + public void setBalanceReportPath(String path) { + LimaServiceConfig.getInstance().setBalanceReportPath(path); + } + + @Override + public void setBalanceReportAccountReportPath(String path) { + LimaServiceConfig.getInstance().setBalanceReportAccountReportPath(path); + } + + @Override + public void setBalanceSubAccountReportPath(String path) { + LimaServiceConfig.getInstance().setBalanceSubAccountReportPath(path); + } + + @Override + public void setGeneralEntryBookEntryBookMainReportPath(String path) { + LimaServiceConfig.getInstance().setGeneralEntryBookEntryBookMainReportPath(path); + } + + @Override + public void setGeneralEntryBookPeriodReportPath(String path) { + LimaServiceConfig.getInstance().setGeneralEntryBookEntryBookPeriodReportPath(path); + } + + @Override + public void setGeneralEntryBookGeneralEntryBookReportPath(String path) { + LimaServiceConfig.getInstance().setGeneralEntryBookGeneralEntryBookEntryReportPath(path); + } + + @Override + public void setProvisionalEntryBookEntryBookMainReportPath(String path) { + LimaServiceConfig.getInstance().setProvisionalEntryBookEntryBookMainReportPath(path); + } + + @Override + public void setProvisionalEntryBookEntryBookReportPath(String path) { + LimaServiceConfig.getInstance().setProvisionalEntryBookEntryBookReportPath(path); + } + + @Override + public void setProvisionalEntryBookFinancialPeriodReportPath(String path) { + LimaServiceConfig.getInstance().setProvisionalEntryBookFinancialPeriodReportPath(path); + } + + @Override + public void setProvisionalEntryBookTransactionReportPath(String path) { + LimaServiceConfig.getInstance().setProvisionalEntryBookTransactionReportPath(path); + } + +// @Override +// public void setBigDecimalFormat(String format) { +// LimaServiceConfig.getInstance().setBigDecimalFormat(format); +// } +// +// @Override +// public String getBigDecimalFormat() { +// String format = LimaServiceConfig.getInstance().getBigDecimalFormat(); +// return format; +// } + + @Override public void setScale(String scale) { LimaServiceConfig.getInstance().setScale(scale); } 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 6a2ea1d..a90ad64 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 @@ -32,6 +32,7 @@ import org.chorem.lima.beans.DocumentReportImpl; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.BalanceTrialImpl; import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.business.api.IdentityService; @@ -47,7 +48,6 @@ import javax.ejb.EJB; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; -import java.io.File; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collection; @@ -74,9 +74,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal protected IdentityService identityService; protected static final Integer ACCOUNT_NUMBER_SIZE = 6; - protected static String ROOT_PATH = new File("").getAbsolutePath(); - protected static String BALANCE_REPORT_ACCOUNT_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml"; - protected static String BALANCE_SUB_ACCOUNTS_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml"; + protected static final String TITLE = "BALANCE"; protected static final Predicate<BalanceReportAccount> HAS_NO_ENTRY = new Predicate<BalanceReportAccount>() { @@ -93,6 +91,9 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String currency) { + String BALANCE_REPORT_ACCOUNT_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceReportAccountReportPath(); + String BALANCE_SUB_ACCOUNTS_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceSubAccountReportPath(); + DocumentReport result = new DocumentReportImpl(); Identity identity = identityService.getIdentity(); 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 40c8ea3..af5412d 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 @@ -14,6 +14,7 @@ import org.chorem.lima.beans.EntryBookPeriodReport; import org.chorem.lima.beans.EntryBookPeriodReportImpl; import org.chorem.lima.beans.GeneralEntryBookEntry; import org.chorem.lima.beans.GeneralEntryBookEntryImpl; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.ClosedPeriodicEntryBookService; import org.chorem.lima.business.api.EntryService; import org.chorem.lima.business.api.FinancialPeriodService; @@ -28,7 +29,6 @@ import javax.ejb.EJB; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; -import java.io.File; import java.math.BigDecimal; import java.util.Collection; import java.util.Date; @@ -68,13 +68,14 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @EJB protected IdentityService identityService; - protected static String ROOT_PATH = new File("").getAbsolutePath(); - protected static String ENTRY_BOOK_PERIOD_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml"; - protected static String GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml"; + protected static final String TITLE = "Journal Général Provisoire"; @Override public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, String currency) { + String entryBookPeriodReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryBookPeriodReportPath(); + String generalEntryBookEntryBookMainReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryBookMainReportPath(); + DocumentReport result = new DocumentReportImpl(); try { @@ -87,7 +88,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple result.setCurrency(currency); result.setFromDate(beginDate); result.setToDate(endDate); - result.setSubReportPath(ENTRY_BOOK_PERIOD_REPORT_PATH); + result.setSubReportPath(entryBookPeriodReportPath); List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(beginDate, endDate); @@ -159,7 +160,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { EntryBookPeriodReport entryBookPeriodReport = new EntryBookPeriodReportImpl(); entryBookPeriodReport.setPeriod(financialPeriod.getBeginDate()); - entryBookPeriodReport.setSubReportPath(GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH); + entryBookPeriodReport.setSubReportPath(generalEntryBookEntryBookMainReportPath); entryBookPeriodReport.setSoldeDebit(subAmountDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : subAmountDebit.toPlainString()); entryBookPeriodReport.setSoldeCredit(subAmountCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : subAmountCredit.toPlainString()); entryBookPeriodReport.setGeneralEntryBookEntry(Lists.newArrayList(generalEntryBookEntries)); 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 new file mode 100644 index 0000000..cf97ecb --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java @@ -0,0 +1,143 @@ +package org.chorem.lima.business.ejb.report; + +import org.chorem.lima.LimaTechnicalException; +import org.chorem.lima.beans.BalanceTrial; +import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.report.GeneralEntryBookReportService; +import org.chorem.lima.business.api.report.LedgerReportService; +import org.chorem.lima.business.ejb.AbstractLimaService; +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 javax.ejb.EJB; +import javax.ejb.Remote; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import static org.nuiton.i18n.I18n.t; + +/** + * Created by davidcosse on 20/11/14. + */ +@Stateless +@Remote(LedgerReportService.class) +@TransactionAttribute +public class LedgerReportServiceImpl extends AbstractLimaService implements LedgerReportService { + + @EJB + protected ReportService reportService; + + @Override + public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency) { + return null; +// List<Object> list = new ArrayList<Object>(); +// +// if (beginDate != null && endDate != null) { +// try { +// +// BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); +// if (balanceTrial.getReportsDatas() != null) { +// for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { +// list.add(reportsDatas); +// List<Entry> entries = reportsDatas.getListEntry(); +// if (entries != null) { +// Collections.sort(entries, new EntryComparator()); +// list.addAll(entries); +// } +// } +// } +// +// //create pages +// int i = 0; +// int n = list.size(); +// +// boolean even = true; +// BigDecimal currentAmountDebit =BigDecimal.ZERO; +// BigDecimal currentAmountCredit =BigDecimal.ZERO; +// +// while (i < n) { +// +// int indexEntry = -1; +// +// for (Object object : list) { +// if (object instanceof ReportsDatas) { +// +//// ReportsDatas reportsDatas = (ReportsDatas) object; +//// +//// String accountS = ""; +//// Account account = reportsDatas.getAccount(); +//// if (account != null) { +//// accountS = account.getAccountNumber() + "\t" + account.getLabel(); +//// } +//// BigDecimal amountCredit = reportsDatas.getAmountCredit(); +//// BigDecimal amountDebit = reportsDatas.getAmountDebit(); +//// +//// String [] columnsTable = {accountS, +//// amountDebit.toString(), amountCredit.toString(), +//// amountDebit.subtract(amountCredit).toString()}; +// +// } else { +// indexEntry++; +// Entry entry = (Entry) object; +// +// String entryBookCode = ""; +// EntryBook entryBook = entry.getFinancialTransaction().getEntryBook(); +// if (entryBook != null) { +// entryBookCode = entryBook.getCode(); +// } +// BigDecimal amountDebit = BigDecimal.ZERO, +// amountCredit = BigDecimal.ZERO; +// if (entry.isDebit()) { +// amountDebit = entry.getAmount(); +// } else { +// amountCredit = entry.getAmount(); +// } +// +// String [] columnsTable = {t("lima-business.document.dateformat",entry.getFinancialTransaction().getTransactionDate()), +// entryBookCode, entry.getVoucher(), entry.getDescription(), +// amountDebit.toString(), amountCredit.toString(), amountDebit.subtract(amountCredit).toString()}; +// ledgerReport += constructTableLine(columnsTable, even); +// even = !even; +// } +// } +// +// // close inner +// ledgerReport += "</tbody></table>" + +// "</td>" + +// "</tr>"; +// +// for (Object objectList : list) { +// if (objectList instanceof Entry) { +// Entry entry = (Entry) objectList; +// if (entry.isDebit()) { +// currentAmountDebit = currentAmountDebit.add(entry.getAmount()); +// } else { +// currentAmountCredit = currentAmountCredit.add(entry.getAmount()); +// } +// } +// } +// +// i = i + n; +// } +// //final amounts +// String [] columnsTable = { boldBegin + t("lima-business.document.amounts") + boldEnd, +// boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, +// boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; +// ledgerReport += constructTableLine(columnsTable, even); +// +// +// } catch (Exception ex) { +// throw new LimaTechnicalException("Can't create document", ex); +// } +// } + } +} 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 beb9041..658d2d3 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 @@ -1,5 +1,6 @@ package org.chorem.lima.business.ejb.report; +import com.google.common.base.Preconditions; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -12,26 +13,24 @@ import org.chorem.lima.beans.FinancialPeriodReport; import org.chorem.lima.beans.FinancialPeriodReportImpl; import org.chorem.lima.beans.Transaction; import org.chorem.lima.beans.TransactionImpl; -import org.chorem.lima.business.api.ClosedPeriodicEntryBookService; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.EntryBookService; import org.chorem.lima.business.api.EntryService; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; -import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; -import java.io.File; import java.math.BigDecimal; +import java.text.DecimalFormat; import java.util.Date; import java.util.List; @@ -48,9 +47,6 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo protected FinancialPeriodService financialPeriodService; @EJB - protected ClosedPeriodicEntryBookService closedPeriodicEntryBookService; - - @EJB protected EntryService entryService; @EJB @@ -62,16 +58,28 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo @EJB protected FinancialTransactionService financialTransactionService; - protected static String ROOT_PATH = new File("").getAbsolutePath(); - protected static String ENTRY_BOOK_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml"; - protected static String FINANCIAL_PERIOD_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml"; - protected static String TRANSACTION_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/Transaction.jrxml"; protected static final String TITLE = "Récapitulatif par compte"; + /** + * - ENTRY_BOOK_REPORT_PATH + * - FINANCIAL_PERIOD_REPORT_PATH + * - TRANSACTION_REPORT_PATH + * - CURRENCY + * - BIG_DECIMAL_FORMAT + **/ @Override - public DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency) { + public DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat) { + LimaServiceConfig config = LimaServiceConfig.getInstance(); + + String entryBookReportPath = config.getProvisionalEntryBookEntryBookReportPath(); + String financialPeriodReportPath = config.getProvisionalEntryBookFinancialPeriodReportPath(); + String transactionReportPath = config.getProvisionalEntryBookTransactionReportPath(); + DocumentReport documentReport = new DocumentReportImpl(); try { + Preconditions.checkArgument(StringUtils.isNoneBlank(entryBookReportPath)); + Preconditions.checkArgument(StringUtils.isNoneBlank(financialPeriodReportPath)); + Preconditions.checkArgument(StringUtils.isNoneBlank(transactionReportPath)); if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); @@ -82,7 +90,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo documentReport.setCurrency(currency); documentReport.setFromDate(beginDate); documentReport.setToDate(endDate); - documentReport.setSubReportPath(ENTRY_BOOK_REPORT_PATH); + + documentReport.setSubReportPath(entryBookReportPath); BigDecimal documentReportDebit = BigDecimal.ZERO; BigDecimal documentReportCredit = BigDecimal.ZERO; @@ -100,11 +109,10 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for(EntryBook entryBook:entryBooks) { - EntryBookReport entryBookReport = new EntryBookReportImpl(); entryBookReport.setLibelle(entryBook.getLabel()); entryBookReport.setCode(entryBook.getCode()); - entryBookReport.setSubReportPath(FINANCIAL_PERIOD_REPORT_PATH); + entryBookReport.setSubReportPath(financialPeriodReportPath); BigDecimal entryBookSoldeDebit = BigDecimal.ZERO; BigDecimal entryBookSoldeCredit = BigDecimal.ZERO; @@ -113,7 +121,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for (FinancialPeriod financialPeriod : financialPeriods) { FinancialPeriodReport financialPeriodReport = new FinancialPeriodReportImpl(); - financialPeriodReport.setSubReportPath(TRANSACTION_REPORT_PATH); + financialPeriodReport.setSubReportPath(transactionReportPath); financialPeriodReport.setPeriod(financialPeriod.getBeginDate()); BigDecimal financialPeriodDebit = BigDecimal.ZERO; @@ -136,8 +144,9 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo transaction.setAccount(entry.getAccount().getAccountNumber() + " - " + entry.getAccount().getLabel()); transaction.setLibelle(entry.getDescription()); transaction.setVoucher(entry.getVoucher()); - transaction.setDebit(debit.compareTo(BigDecimal.ZERO) == 0 ? "" : debit.toPlainString()); - transaction.setCredit(credit.compareTo(BigDecimal.ZERO) == 0 ? "" : credit.toPlainString()); + transaction.setDebit(debit); + transaction.setCredit(credit); + transaction.setFormatter(bigDecimalFormat); financialPeriodDebit = financialPeriodDebit.add(debit); financialPeriodCredit = financialPeriodCredit.add(credit); diff --git a/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java b/lima-business/src/main/java/org/chorem/lima/business/utils/BigDecimalToString.java similarity index 55% copy from lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java copy to lima-business/src/main/java/org/chorem/lima/business/utils/BigDecimalToString.java index 5bc903f..c40813c 100644 --- a/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java +++ b/lima-business/src/main/java/org/chorem/lima/business/utils/BigDecimalToString.java @@ -1,29 +1,6 @@ -package org.chorem.lima.util; +package org.chorem.lima.business.utils; -/* - * #%L - * Lima :: Swing - * %% - * 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 org.chorem.lima.LimaSwingApplicationContext; -import org.chorem.lima.LimaSwingConfig; +import org.chorem.lima.business.LimaServiceConfig; import java.math.BigDecimal; import java.text.DecimalFormat; @@ -36,7 +13,13 @@ public class BigDecimalToString { public static String format(BigDecimal value) { - LimaSwingConfig config = LimaSwingApplicationContext.getContext().getConfig(); + DecimalFormat formatter = getDecimalFormat(); + String result = formatter.format(value); + return result; + } + + public static DecimalFormat getDecimalFormat() { + LimaServiceConfig config = LimaServiceConfig.getInstance(); StringBuilder scale = new StringBuilder(); for (int i = 0; i < config.getScale(); i++) { scale.append("0"); @@ -55,8 +38,7 @@ public class BigDecimalToString { //always set grouping formatter.setGroupingUsed(true); formatter.setGroupingSize(3); - String result = formatter.format(value); - return result; + return formatter; } } diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 2c2a7ab..aa2b1b3 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -126,6 +126,7 @@ lima-business.import.vatstatementalnomaster=FAILED \: The vatStatement %s has ma lima-business.import.vatstatementalreadyexist=FAILED \: The vatStatement %s already exists \!\n lima.config.configFileName.description=Filename of Lima's configuration lima.config.data.dir.description=Data directory of Lima +lima.config.documentReport.balanceReportAccount.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 95dc0c4..e708dfe 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -121,6 +121,12 @@ lima-business.import.vatstatementalnomaster=u00C9chec \: Le plan %s possède le lima-business.import.vatstatementalreadyexist=u00C9chec \: Le plan %s exist déjà \!\n lima.config.configFileName.description=Nom du fichier de configuration de Lima lima.config.data.dir.description=Répertoire des données de Lima +lima.config.documentReport.balanceReportAccount.description= +lima.config.documentReport.bigDecimalFormat=formattage des montants +lima.config.documentReport.entryBookReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBookReport' +lima.config.documentReport.financialPeriodPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'FinancialPeriodReport' +lima.config.documentReport.generalEntryBookReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.transactionReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'Transaction' lima.config.httpport.description=Port HTTP lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport diff --git a/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java b/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java index d5c7bdc..bf49d86 100644 --- a/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java +++ b/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java @@ -68,7 +68,7 @@ public class EntryTopiaDao extends AbstractEntryTopiaDao<Entry> { HqlAndParametersBuilder<Entry> builder = getEquilibredTransactionQuery(beginDate, endDate); builder.addEquals(Entry.PROPERTY_ACCOUNT, account); - + builder.setOrderByArguments(Entry.PROPERTY_FINANCIAL_TRANSACTION + "." + FinancialTransaction.PROPERTY_TRANSACTION_DATE); List<Entry> entries = findAll(builder.getHql(), builder.getHqlParameters()); return entries; diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index b1a5cd7..ff4bbc6 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java index 23070eb..e74b66c 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java @@ -25,6 +25,7 @@ package org.chorem.lima; import jaxx.runtime.SwingUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; @@ -201,8 +202,27 @@ public class LimaMain { public static HttpServerService getHttpServerService() { if (httpServerService == null) { + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + LimaSwingConfig swingConfig = LimaSwingConfig.getInstance(); + + serviceConfig.setBalanceReportPath(swingConfig.getBalanceReportPath()); + serviceConfig.setReportsDir(swingConfig.getReportsDir().getAbsolutePath()); + serviceConfig.setAccountReportPath(swingConfig.getAccountReportPath()); + serviceConfig.setBalanceReportPath(swingConfig.getBalanceReportPath()); + serviceConfig.setBalanceReportAccountReportPath(swingConfig.getBalanceReportAccountReportPath()); + serviceConfig.setBalanceSubAccountReportPath(swingConfig.getBalanceSubAccountReportPath()); + serviceConfig.setGeneralEntryBookEntryBookMainReportPath(swingConfig.getGeneralEntryBookEntryBookMainReportPath()); + serviceConfig.setGeneralEntryBookGeneralEntryBookEntryReportPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); + serviceConfig.setGeneralEntryBookGeneralEntryBookEntryReportPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); + serviceConfig.setProvisionalEntryBookEntryBookMainReportPath(swingConfig.getProvisionalEntryBookEntryBookMainReportPath()); + serviceConfig.setProvisionalEntryBookEntryBookReportPath(swingConfig.getProvisionalEntryBookEntryBookReportPath()); + serviceConfig.setProvisionalEntryBookFinancialPeriodReportPath(swingConfig.getProvisionalEntryBookFinancialPeriodReportPath()); + serviceConfig.setProvisionalEntryBookTransactionReportPath(swingConfig.getProvisionalEntryBookTransactionReportPath()); + + httpServerService = new HttpServerService(); } return httpServerService; } + } diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java index 18695df..59a72f4 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java @@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.actions.MiscAction; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.entity.LimaCallaoEntityEnum; import org.chorem.lima.service.LimaServiceFactory; @@ -75,6 +76,8 @@ public class LimaSwingConfig extends ApplicationConfig { /** La version du logiciel. */ protected Version version; + protected final static String ROOT_PATH = new File("").getAbsolutePath(); + /** * Get copyright text (include version). * @@ -190,6 +193,7 @@ public class LimaSwingConfig extends ApplicationConfig { */ public char getDecimalSeparator() { char decimalSeparator = getOption(Option.DECIMAL_SEPARATOR.key).charAt(0); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); return decimalSeparator; } @@ -201,6 +205,8 @@ public class LimaSwingConfig extends ApplicationConfig { */ public void setDecimalSeparator(String decimalSeparator) { setOption(Option.DECIMAL_SEPARATOR.key, decimalSeparator); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + serviceConfig.setDecimalSeparator(decimalSeparator); saveForUser(); firePropertyChange("decimalSeparator", null, decimalSeparator); } @@ -222,6 +228,8 @@ public class LimaSwingConfig extends ApplicationConfig { */ public void setScale(String scale) { setOption(Option.SCALE.key, scale); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + serviceConfig.setScale(scale); saveForUser(); firePropertyChange("scale", null, scale); if (log.isInfoEnabled()) { @@ -247,6 +255,8 @@ public class LimaSwingConfig extends ApplicationConfig { */ public void setThousandSeparator(String thousandSeparator) { setOption(Option.THOUSAND_SEPARATOR.key, thousandSeparator); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + serviceConfig.setThousandSeparator(thousandSeparator); saveForUser(); firePropertyChange("thousandSeparator", null, thousandSeparator); } @@ -267,6 +277,8 @@ public class LimaSwingConfig extends ApplicationConfig { */ public void setCurrency(boolean currency) { setOption(Option.CURRENCY.key, Boolean.toString(currency)); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + serviceConfig.setCurrency(Boolean.toString(currency)); saveForUser(); firePropertyChange("currency", null, currency); } @@ -349,6 +361,68 @@ public class LimaSwingConfig extends ApplicationConfig { return getOptionAsBoolean((Option.SELECT_ALL_EDITING_CELL.key)); } + public File getReportsDir() { + String reportsDirPath = getOption(Option.REPORTS_DIR.key); + File reportsDir = new File(reportsDirPath); + return reportsDir; + } + + // reports + public String getAccountReportPath() { + String result = getOption(Option.ACCOUNT_REPORT_PATH.key); + return result; + } + + public String getBalanceReportPath() { + String result = getOption(Option.BALANCE_REPORT_PATH.key); + return result; + } + + public String getBalanceReportAccountReportPath() { + String result = getOption(Option.BALANCE_REPORT_ACCOUNT_REPORT_PATH.key); + return result; + } + + public String getBalanceSubAccountReportPath() { + String result = getOption(Option.BALANCE_SUB_ACCOUNT_REPORT_PATH.key); + return result; + } + + public String getGeneralEntryBookEntryBookMainReportPath() { + String result = getOption(Option.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key); + return result; + } + + public String getGeneralEntryBookEntryBookPeriodReportPath() { + String result = getOption(Option.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.key); + return result; + } + + public String getGeneralEntryBookGeneralEntryBookEntryReportPath() { + String result = getOption(Option.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.key); + return result; + } + + public String getProvisionalEntryBookEntryBookMainReportPath() { + String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); + return result; + } + + public String getProvisionalEntryBookEntryBookReportPath() { + String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.getKey()); + return result; + } + + public String getProvisionalEntryBookFinancialPeriodReportPath() { + String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.getKey()); + return result; + } + + public String getProvisionalEntryBookTransactionReportPath() { + String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.getKey()); + return result; + } + /** Used in ???? */ protected static final String[] DEFAULT_JAXX_PCS = {"fullScreen", "locale", "decimalSeparator", "scale", "thousandSeparator", "currency"}; @@ -380,7 +454,6 @@ public class LimaSwingConfig extends ApplicationConfig { */ public enum Option implements ConfigOptionDef { - CONFIG_FILE(CONFIG_FILE_NAME, t("lima.config.configFileName.label"), n("lima.config.configFileName.description"), @@ -618,7 +691,79 @@ public class LimaSwingConfig extends ApplicationConfig { t("lima.config.cell.pair.selected.mandatory.foreground.label"), n("lima.config.cell.pair.selected.mandatory.foreground.description"), "#000000", - Color.class, false, false); + Color.class, false, false), + + REPORTS_DIR("lima.reports.dir", + "", + n("lima.config.reports.dir.description"), + "${lima.data.dir}/reports", File.class, false, false), + + + ACCOUNT_REPORT_PATH("lima.accounts.accountReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml", + String.class, false, false), + + BALANCE_REPORT_PATH("lima.balance.balanceReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml", + String.class, false, false), + + BALANCE_REPORT_ACCOUNT_REPORT_PATH("lima.balance.balanceReportAccountReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml", + String.class, false, false), + + BALANCE_SUB_ACCOUNT_REPORT_PATH("lima.balance.balanceSubAccountReportPath", + "", + n("lima.config.documentReport.balanceReportAccount.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml", + String.class, false, false), + + GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.generalEntryBook.entryBookMainReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml", + String.class, false, false), + + GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH("lima.generalEntryBook.entryBookPeriodReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml", + String.class, false, false), + + + GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH("lima.generalEntryBook.generalEntryBookEntryReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml", + String.class, false, false), + + PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.provisionalEntryBook.entryBookMainReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml", + String.class,false, false), + PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH("lima.provisionalEntryBook.entryBookReport", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml", + String.class,false, false), + + PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH("lima.provisionalEntryBook.financialPeriodReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml", + String.class, false, false), + + PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH("lima.provisionalEntryBook.transactionReportPath", + "", + "", + ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml", + String.class, false, false); protected enum ComportmentEditingCellEnum {ALL, NOTHING} @@ -739,9 +884,15 @@ public class LimaSwingConfig extends ApplicationConfig { optionsService = LimaServiceFactory.getService(OptionsService.class); // scale server option - String scaleOption = getOption("scale"); + String scaleOption = getOption(Option.SCALE.key); if (StringUtils.isNotBlank(scaleOption)) { optionsService.setScale(scaleOption); } + + // report BigDecimal format +// String bigDecimalFormat = getOption(Option.BIG_DECIMAL_FORMAT.key); +// if (StringUtils.isNotBlank(bigDecimalFormat)) { +// optionsService.setBigDecimalFormat(bigDecimalFormat); +// } } } diff --git a/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java b/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java index 5bc903f..ee26da8 100644 --- a/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java +++ b/lima-swing/src/main/java/org/chorem/lima/util/BigDecimalToString.java @@ -36,6 +36,12 @@ public class BigDecimalToString { public static String format(BigDecimal value) { + DecimalFormat formatter = getDecimalFormat(); + String result = formatter.format(value); + return result; + } + + public static DecimalFormat getDecimalFormat() { LimaSwingConfig config = LimaSwingApplicationContext.getContext().getConfig(); StringBuilder scale = new StringBuilder(); for (int i = 0; i < config.getScale(); i++) { @@ -55,8 +61,7 @@ public class BigDecimalToString { //always set grouping formatter.setGroupingUsed(true); formatter.setGroupingSize(3); - String result = formatter.format(value); - return result; + return formatter; } } diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 6559df7..7fd97de 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -90,12 +90,16 @@ lima.config.data.dir.description= lima.config.data.dir.label= lima.config.decimalSeparator.description= lima.config.decimalSeparator.label= +lima.config.documentReport.balanceReportAccount.description= +lima.config.documentReport.bigDecimalFormat.description= +lima.config.documentReport.bigDecimalFormat.label= lima.config.host.address.description= lima.config.host.address.label= lima.config.i18n.dir.description= lima.config.i18n.dir.label= lima.config.locale.description=Localization used by LIMA lima.config.locale.label= +lima.config.reports.dir.description= lima.config.resources.dir.description= lima.config.resources.dir.label= lima.config.scale.description= diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index 91d9677..c09f545 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -89,6 +89,9 @@ lima.config.data.dir.description=Répertoire d'enregistrement des données de l' lima.config.data.dir.label=Répertoire des données lima.config.decimalSeparator.description=Caractères de séparation entre la partie entière et la parti décimale d'un nombre lima.config.decimalSeparator.label=Séparateur de décimales +lima.config.documentReport.balanceReportAccount.description= +lima.config.documentReport.bigDecimalFormat.description=format pour affichage des montants dans les rapports +lima.config.documentReport.bigDecimalFormat.label=format pour affichage des montants lima.config.host.address.description=Adresse du serveur distant lima.config.host.address.label=Serveur lima.config.i18n.dir.description=Dossier contenant les traduction de lima @@ -99,6 +102,7 @@ lima.config.numberSeparator.comma=Virgule lima.config.numberSeparator.dot=Point lima.config.numberSeparator.semicolon=Point-virgule lima.config.numberSeparator.space=Espace +lima.config.reports.dir.description= lima.config.resources.dir.description=Dossier contenant les fichiers ressouces de lima lima.config.resources.dir.label=Dossier ressources lima.config.scale.description=Nombre de caratères décimales pour les montants diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml index 4e2e640..8808273 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T10:49:29 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-09T11:11:04 --> <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"/> @@ -115,7 +115,7 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <staticText> - <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="60" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="60" 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> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml index 36565c0..b5b4e2e 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml @@ -1,18 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T12:48:02 --> -<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="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-13T10:25:20 --> +<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="50" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <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="Arial"/> <style name="Default oblique" fontName="Monospaced"/> <queryString> @@ -39,16 +31,18 @@ <property name="com.jaspersoft.studio.unit.y" 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"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textField pattern="" isBlankWhenNull="true"> - <reportElement mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> + <reportElement mode="Transparent" x="0" y="0" width="434" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> <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"/> @@ -62,6 +56,38 @@ </textElement> <textFieldExpression><![CDATA["Journal " + $F{code} + " " + $F{libelle}]]></textFieldExpression> </textField> + <textField> + <reportElement x="434" y="0" width="72" height="10" uuid="baca77fb-1d57-428f-8746-1bb482b61b55"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" uuid="da04b7ce-dd80-4c40-a0cb-7d74dac0da00"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> </frame> </band> </pageHeader> @@ -78,21 +104,5 @@ <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> - <band height="1"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <break> - <reportElement x="0" y="0" width="100" height="1" uuid="7f204895-3931-4eba-afb5-9614bcbb59f2"> - <printWhenExpression><![CDATA[new Boolean(($V{REPORT_COUNT} > 1 || $V{PAGE_NUMBER} > 1) && ($V{REPORT_COUNT}<=$F{financialPeriodReport}.size()))]]></printWhenExpression> - </reportElement> - </break> - </band> </detail> - <columnFooter> - <band height="1"> - <line> - <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#FDCA97" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> - </line> - </band> - </columnFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml index 3f7b304..8a0b4a8 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T14:12:55 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-13T15:57:01 --> <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="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -42,16 +42,18 @@ <property name="com.jaspersoft.studio.unit.y" 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"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textField pattern="" isBlankWhenNull="true"> - <reportElement x="0" y="0" width="578" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> <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"/> @@ -65,6 +67,38 @@ </textElement> <textFieldExpression><![CDATA[new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> </textField> + <textField pattern=""> + <reportElement x="434" y="0" width="72" height="10" uuid="e6c93d97-54e3-4b70-9c28-56a3319bad77"> + <property name="local_mesure_unitx" value="pixel"/> + <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="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" uuid="b5197d26-0ac8-4102-9a6e-857a6e2b2c99"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> </frame> </band> </pageHeader> @@ -80,16 +114,18 @@ <property name="com.jaspersoft.studio.unit.y" 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"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textField pattern="" isBlankWhenNull="true"> - <reportElement x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> + <reportElement x="0" y="0" width="434" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> <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"/> @@ -103,6 +139,38 @@ </textElement> <textFieldExpression><![CDATA[new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> </textField> + <textField pattern=""> + <reportElement x="434" y="0" width="72" height="10" uuid="128b759f-c6d0-4310-a83c-8b9993d537dd"> + <property name="local_mesure_unitx" value="pixel"/> + <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="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" uuid="49cc6926-8eb0-4e4c-9c53-6efc0a56a728"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </textField> </frame> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="subreport-5" positionType="Float" mode="Opaque" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"> @@ -125,80 +193,24 @@ <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> - <band height="20" splitType="Prevent"> + <band height="10" splitType="Prevent"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <frame> - <reportElement style="Default" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="578" height="20" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="571d1774-22c4-4ab4-901b-7470c74f0405"> + <reportElement style="Default" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="571d1774-22c4-4ab4-901b-7470c74f0405"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" 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"/> + <topPen lineWidth="0.0" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> - <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="dc68030b-597d-47b5-8be9-eecfdde17f5e"> - <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"/> - <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="Left" verticalAlignment="Middle"> - <font size="8" isBold="true" isItalic="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="80"/> - </textElement> - <textFieldExpression><![CDATA["Sous-total pour " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="10" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" 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 fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="10" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" 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 fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> <textField pattern="" isBlankWhenNull="true"> - <reportElement x="0" y="10" width="434" height="10" forecolor="#736343" uuid="d3f672ab-80d2-4467-9ff9-73d4611a3025"> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="d3f672ab-80d2-4467-9ff9-73d4611a3025"> <property name="local_mesure_unity" value="pixel"/> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> @@ -211,7 +223,7 @@ <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"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> @@ -220,52 +232,41 @@ </textElement> <textFieldExpression><![CDATA["Solde pour le journal " + $F{entryBookCode} + " jusqu'à fin " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> </textField> - <textField pattern="" isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="6edd06d5-7b8c-4b6e-b114-9c97f09b7fc4"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> - <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"/> + <topPen lineWidth="0.0" 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="Right" verticalAlignment="Middle"> <font fontName="Courier 10 Pitch" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> </textField> - <textField pattern="" isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="57f02392-c1a0-4a55-abd1-559b2dbce366"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> - <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"/> + <topPen lineWidth="0.0" 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="Right" verticalAlignment="Middle"> <font fontName="Courier 10 Pitch" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> </textField> </frame> </band> </detail> - <columnFooter> - <band height="1"> - <line> - <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#FDCA97" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> - </line> - </band> - </columnFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/Transaction.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/Transaction.jrxml deleted file mode 100644 index 99b896a..0000000 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/Transaction.jrxml +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-19T22:13:44 --> -<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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> - <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"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="libelle" class="java.lang.String"/> - <field name="debit" class="java.lang.String"/> - <field name="credit" class="java.lang.String"/> - <field name="transactionDate" class="java.util.Date"/> - <field name="account" class="java.lang.String"/> - <field name="voucher" class="java.lang.String"/> - <detail> - <band height="10" splitType="Stretch"> - <textField pattern="" isBlankWhenNull="true"> - <reportElement x="0" y="0" width="60" 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.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{transactionDate})]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="60" y="0" width="100" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <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.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{account}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="160" y="0" width="40" 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.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="200" y="0" width="234" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <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.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> - </textField> - </band> - </detail> -</jasperReport> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml new file mode 100644 index 0000000..7ff7234 --- /dev/null +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml @@ -0,0 +1,297 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-13T15:57:19 --> +<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="30" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <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"/> + <style name="Default" isDefault="true" fontName="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="libelle" class="java.lang.String"/> + <field name="debit" class="java.math.BigDecimal"/> + <field name="credit" class="java.math.BigDecimal"/> + <field name="transactionDate" class="java.util.Date"/> + <field name="account" class="java.lang.String"/> + <field name="voucher" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="EntryBookDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="EntryBookEndColomnDebitSolde" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="EntryBookCreditSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="EntryBookEndColomnCreditSolde" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <textField pattern="" isBlankWhenNull="true"> + <reportElement x="0" y="0" width="60" 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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{transactionDate})]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="60" y="0" width="100" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{account}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="160" y="0" width="40" 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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="200" y="0" width="234" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{credit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{credit}) : ""]]></textFieldExpression> + </textField> + <textField> + <reportElement x="434" y="0" width="72" height="10" uuid="39bdbda9-8233-4e46-b3ed-d5f0d06e2d86"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debit}) : ""]]></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 mode="Transparent" x="0" y="0" width="578" height="10" uuid="48190dbf-c1d0-421a-bfcb-9c9db0c0c359"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textField> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="d622e85e-b93e-4be5-90e0-cf3b854f012d"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement> + <font size="8" isBold="true"/> + <paragraph leftIndent="80"/> + </textElement> + <textFieldExpression><![CDATA["Sous-total"]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="75ef2eb9-6e2d-447c-9dd6-488a63fcdf04"> + <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"/> + <printWhenExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="c52c36a6-6a50-473b-9dad-0526f039b7c1"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnCreditSolde}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </columnFooter> + <lastPageFooter> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="d7d82e83-663d-410a-a61d-6211645557ce"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textField> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="16735e42-8adf-47c5-8aa6-590bbc2327a9"> + <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="#804000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement> + <font size="8" isBold="true"/> + <paragraph leftIndent="80"/> + </textElement> + <textFieldExpression><![CDATA["Sous-total pour " + new SimpleDateFormat("MMMM yyyy").format($F{transactionDate})]]></textFieldExpression> + </textField> + <textField pattern=""> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="4c23c4e2-1c93-4a78-b82b-895286708171"> + <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> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{EntryBookDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="a7b19080-fcc5-407b-ae5c-20a85afd363e"> + <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.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{EntryBookCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookCreditSolde}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </lastPageFooter> +</jasperReport> 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/action/DocumentService.java index 086b52d..2b014a9 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -26,8 +26,6 @@ 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.apache.pdfbox.examples.fdf.SetField; -import org.apache.pdfbox.pdmodel.PDDocument; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.DocumentReport; @@ -44,28 +42,27 @@ import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.api.VatStatementService; 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.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.entity.VatStatement; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.web.action.balance.ReportBuilder; import org.chorem.lima.web.utils.DocumentsEnum; import javax.swing.*; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; +import java.util.Properties; import static org.nuiton.i18n.I18n.t; @@ -88,18 +85,20 @@ public class DocumentService { protected ProvisionalEntryBookReportService provisionalEntryBookReportService; + protected LedgerReportService ledgerReportService; + protected ClosedPeriodicEntryBookService closedPeriodicEntryBookService; protected FinancialPeriodService financialPeriodService; protected EntryService entryService; - protected String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); - protected ReportBuilder reportBuilder; protected AccountService accountService; + protected String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); + protected final String BALANCE_FILE_PATH = path + File.separator + DocumentsEnum.BALANCE.getFileName() + ".pdf"; protected final String GENERAL_ENTRY_BOOK_REPORT_PDF_FILE_PATH = path + File.separator + DocumentsEnum.GENERAL_ENTRY_BOOK.getFileName() + ".pdf"; protected final String ENTRY_BOOKS_REPORT_PDF_FILE_PATH = path + File.separator + DocumentsEnum.ENTRY_BOOKS.getFileName() + ".pdf"; @@ -400,79 +399,79 @@ public class DocumentService { } //############## VAT ############## - public void createVatDocuments(Date beginDate, - Date endDate, - String autocomplete) { - - String filePath = path + File.separator - + DocumentsEnum.VAT.getFileName() + ".pdf"; - - String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); - - String filePathDefault = path + File.separator - + DocumentsEnum.VAT.getFileName() + "_default.pdf"; - - PDDocument doc; - InputStream reportsStream; - - String vatPDFUrl = LimaServiceConfig.getInstance().getVatPDFUrl(); - - if (vatPDFUrl.equals("default")) { - reportsStream = DocumentService.class - .getResourceAsStream("/reports/vat_form_fr.pdf"); - if (reportsStream == null) { - throw new LimaTechnicalException("Could not find such file " - + "/reports/vat_form_fr.pdf"); - } - } else { - try { - reportsStream = new FileInputStream(filePathDefault); - } catch (FileNotFoundException eee) { - throw new LimaTechnicalException("Could not find such file " - + filePathDefault, eee); - } - } - - try { - - // load the document - doc = PDDocument.load(reportsStream); - - if (autocomplete != null) { - if (log.isDebugEnabled()) { - log.debug("autocomplete: " + autocomplete); - } - if (autocomplete.equals("true")) { - - SetField fields = new SetField(); - - //search for all VAT Statements from the report - List<VatStatement> vatStatementsList = vatStatementService.getAllVatStatements(); - if (log.isDebugEnabled()) { - log.debug("vatStatementsList.size() : " + vatStatementsList.size()); - } - for (VatStatement vatStatement : vatStatementsList) { - //search for amount to display - BigDecimal amount = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate).getAmount(); - //display amount only if it is a child and has a BoxName - if (vatStatement.getBoxName() != null && !vatStatement.isHeader()) { - if (log.isDebugEnabled()) { - log.debug("Set field..."); - } - fields.setField(doc, vatStatement.getBoxName(), amount.toString()); - } - } - } - } - - // save the updated document to the new file and close - doc.save(filePath); - doc.close(); - - } catch (Exception ex) { - throw new LimaTechnicalException("Can't create document", ex); - } - } +// public void createVatDocuments(Date beginDate, +// Date endDate, +// String autocomplete) { +// +// String filePath = path + File.separator +// + DocumentsEnum.VAT.getFileName() + ".pdf"; +// +// String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); +// +// String filePathDefault = path + File.separator +// + DocumentsEnum.VAT.getFileName() + "_default.pdf"; +// +// PDDocument doc; +// InputStream reportsStream; +// +// String vatPDFUrl = LimaServiceConfig.getInstance().getVatPDFUrl(); +// +// if (vatPDFUrl.equals("default")) { +// reportsStream = DocumentService.class +// .getResourceAsStream("/reports/vat_form_fr.pdf"); +// if (reportsStream == null) { +// throw new LimaTechnicalException("Could not find such file " +// + "/reports/vat_form_fr.pdf"); +// } +// } else { +// try { +// reportsStream = new FileInputStream(filePathDefault); +// } catch (FileNotFoundException eee) { +// throw new LimaTechnicalException("Could not find such file " +// + filePathDefault, eee); +// } +// } +// +// try { +// +// // load the document +// doc = PDDocument.load(reportsStream); +// +// if (autocomplete != null) { +// if (log.isDebugEnabled()) { +// log.debug("autocomplete: " + autocomplete); +// } +// if (autocomplete.equals("true")) { +// +// SetField fields = new SetField(); +// +// //search for all VAT Statements from the report +// List<VatStatement> vatStatementsList = vatStatementService.getAllVatStatements(); +// if (log.isDebugEnabled()) { +// log.debug("vatStatementsList.size() : " + vatStatementsList.size()); +// } +// for (VatStatement vatStatement : vatStatementsList) { +// //search for amount to display +// BigDecimal amount = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate).getAmount(); +// //display amount only if it is a child and has a BoxName +// if (vatStatement.getBoxName() != null && !vatStatement.isHeader()) { +// if (log.isDebugEnabled()) { +// log.debug("Set field..."); +// } +// fields.setField(doc, vatStatement.getBoxName(), amount.toString()); +// } +// } +// } +// } +// +// // save the updated document to the new file and close +// doc.save(filePath); +// doc.close(); +// +// } catch (Exception ex) { +// throw new LimaTechnicalException("Can't create document", ex); +// } +// } public String createAccountDocument(Date beginDate, Date endDate, String account) { @@ -691,8 +690,14 @@ public class DocumentService { } public DocumentReport createEntryBooksDocuments(Date beginDate, Date endDate, List<String> entryBookCodes, String currency) { - DocumentReport report = provisionalEntryBookReportService.getProvisionalEntryBookDocumentReport(beginDate, endDate, entryBookCodes, currency); + DocumentReport report = provisionalEntryBookReportService.getProvisionalEntryBookDocumentReport(beginDate, endDate, entryBookCodes, currency, BigDecimalToString.getDecimalFormat()); reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.ENTRYBOOKS, ENTRY_BOOKS_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); return report; } + +// public DocumentReport createLedgerDocuments(Date beginDate, Date endDate, String currency) { +// DocumentReport report = ledgerReportService.getLedgerDocumentReport(beginDate, endDate, currency); +// reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.LEDGER, LEDGER_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); +// return report; +// } } 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/balance/ReportBuilder.java index b0d571d..ff4238e 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/balance/ReportBuilder.java @@ -34,12 +34,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.utils.DocumentsEnum; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Properties; /** * Created by davidcosse on 02/10/14. @@ -55,12 +57,12 @@ public class ReportBuilder { public ReportBuilder() { try { + LimaServiceConfig config = LimaServiceConfig.getInstance(); + // compile phase - String rootPath = new File("").getAbsolutePath(); - // TODO DCossé 06/11/14 find it from properties - balanceReport= JasperCompileManager.compileReport(rootPath + "/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml"); - generalEntryBookReport = JasperCompileManager.compileReport(rootPath + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml"); - provisionalEntryBookReport = JasperCompileManager.compileReport(rootPath + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml"); + balanceReport= JasperCompileManager.compileReport(config.getBalanceReportPath()); + generalEntryBookReport = JasperCompileManager.compileReport(config.getGeneralEntryBookEntryBookMainReportPath()); + provisionalEntryBookReport = JasperCompileManager.compileReport(config.getProvisionalEntryBookEntryBookMainReportPath()); reportsByDocumentType = Maps.newHashMap(); reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceReport); 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 936972d..feb90be 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 @@ -58,6 +58,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Properties; import static org.nuiton.i18n.I18n.t; @@ -71,26 +72,31 @@ public class HttpServerService { protected Server server; - protected String path; + //protected String path; protected int port; private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd"); - protected ReportBuilder reportBuilder = new ReportBuilder(); + protected ReportBuilder reportBuilder; public HttpServerService() { - path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); + //File reportDir = (File) props.get("REPORTS_DIR"); + //path = reportDir.getAbsolutePath(); port = LimaServiceConfig.getInstance().getHttpPort(); accountService = LimaServiceFactory.getService(AccountService.class); documentService = new DocumentService(); + reportBuilder = new ReportBuilder(); } /** start the server */ public void start() { if (server == null) { try { - FileUtil.createDirectoryIfNecessary(new File(path)); + LimaServiceConfig config = LimaServiceConfig.getInstance(); + File reportDir = config.getReportsDir(); + + FileUtil.createDirectoryIfNecessary(reportDir); server = new Server(port); @@ -172,6 +178,7 @@ public class HttpServerService { beginDateFormat, endDateFormat, account); break; case ENTRYBOOKS: + // TODO DCossé 18/11/14 get currency from config documentService.createEntryBooksDocuments(beginDateFormat, endDateFormat, null, "€"); if (log.isDebugEnabled()) { log.debug("EntryBookReport :" + entryBooksReport); @@ -193,9 +200,9 @@ public class HttpServerService { if (log.isDebugEnabled()) { log.debug("autocomplete : " + autocomplete); } - documentService.createVatDocuments( - beginDateFormat, endDateFormat, - autocomplete); +// documentService.createVatDocuments( +// beginDateFormat, endDateFormat, +// autocomplete); break; } } catch (ParseException eeePE) { @@ -215,6 +222,9 @@ public class HttpServerService { } IOUtils.write(report, out, Charsets.UTF_8); } else { + LimaServiceConfig config = LimaServiceConfig.getInstance(); + File reportDir = config.getReportsDir(); + String path = reportDir.getAbsolutePath(); URL doc = new URL("file:" + path + File.separator + model + ".pdf"); if (log.isDebugEnabled()) { log.debug("file:" + path + File.separator + model + ".pdf"); -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 801d27a13893e4b6ffbae60bbd465d520319278d Author: dcosse <japbiw74> Date: Wed Jan 14 15:00:57 2015 +0100 refs #769 String -> Bigdecimal when there are numeric account values --- .../business/api/report/BalanceReportService.java | 3 +- .../api/report/GeneralEntryBookReportService.java | 3 +- .../ejb/report/BalanceReportServiceImpl.java | 42 +- .../report/GeneralEntryBookReportServiceImpl.java | 23 +- .../ProvisionalEntryBookReportServiceImpl.java | 16 +- .../lima/beans/BalanceReportAccountImpl.java | 35 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 53857 -> 54041 bytes .../main/jasperreports/balance/BalanceReport.jrxml | 544 +++++++++--------- .../balance/BalanceReportAccountReport.jrxml | 251 ++++---- .../balance/BalanceSubAccountsReport.jrxml | 221 +++---- .../generalEntryBook/EntryBookMainReport.jrxml | 633 +++++++++++---------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 279 ++++----- .../GeneralEntryBookEntryReport.jrxml | 157 ++--- .../provisionalEntryBook/EntryBookMainReport.jrxml | 11 +- .../provisionalEntryBook/EntryBookReport.jrxml | 7 +- .../FinancialPeriodReport.jrxml | 13 +- .../provisionalEntryBook/TransactionReport.jrxml | 6 +- .../chorem/lima/web/action/DocumentService.java | 4 +- 18 files changed, 1134 insertions(+), 1114 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java index 3967f57..0a86213 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java @@ -24,6 +24,7 @@ package org.chorem.lima.business.api.report; import org.chorem.lima.beans.DocumentReport; +import java.text.DecimalFormat; import java.util.Date; /** @@ -39,5 +40,5 @@ public interface BalanceReportService { * @param selectedAccounts if null all accounts will be selected * @return the balance beans */ - DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String Currency); + DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String Currency, DecimalFormat bigDecimalFormat); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java index 553b6d1..7623053 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java @@ -2,6 +2,7 @@ package org.chorem.lima.business.api.report; import org.chorem.lima.beans.DocumentReport; +import java.text.DecimalFormat; import java.util.Date; /** @@ -17,5 +18,5 @@ public interface GeneralEntryBookReportService { * @param currency the currency used * @return the entryBook beans */ - DocumentReport getEntryBookDocumentReport(Date from, Date to, String currency); + DocumentReport getEntryBookDocumentReport(Date from, Date to, String currency, DecimalFormat bigDecimalFormat); } 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 a90ad64..bde32b9 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 @@ -49,6 +49,7 @@ 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.Collections; @@ -81,20 +82,21 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public boolean apply(BalanceReportAccount subClasses) { - boolean result = StringUtils.isBlank(subClasses.getAmountDebit()) && - StringUtils.isBlank(subClasses.getAmountCredit()) && - StringUtils.isBlank(subClasses.getSoldeDebit()) && - StringUtils.isBlank(subClasses.getSoldeCredit()); + boolean result = BigDecimal.ZERO.equals(subClasses.getAmountDebit()) && + BigDecimal.ZERO.equals(subClasses.getAmountCredit()) && + BigDecimal.ZERO.equals(subClasses.getSoldeDebit()) && + BigDecimal.ZERO.equals(subClasses.getSoldeCredit()); return result; } }; @Override - public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String currency) { + public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String currency, DecimalFormat bigDecimalFormat) { String BALANCE_REPORT_ACCOUNT_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceReportAccountReportPath(); String BALANCE_SUB_ACCOUNTS_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceSubAccountReportPath(); DocumentReport result = new DocumentReportImpl(); + result.setFormatter(bigDecimalFormat); Identity identity = identityService.getIdentity(); result.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); @@ -151,7 +153,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountsByClasses.put(accountClass, classAccount); returnedAccounts.add(classAccount); } - BalanceReportAccount subClassAccount = bindAccountToBalanceReportAccount(account, from, to); + BalanceReportAccount subClassAccount = bindAccountToBalanceReportAccount(account, from, to, bigDecimalFormat); classAccount.addSubAccount(subClassAccount); } } @@ -167,8 +169,10 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal * Get all entries if true * @throws org.nuiton.topia.persistence.TopiaException */ - protected BalanceReportAccount bindAccountToBalanceReportAccount(Account account, Date beginDate, Date endDate) { + protected BalanceReportAccount bindAccountToBalanceReportAccount(Account account, Date beginDate, Date endDate, DecimalFormat bigDecimalFormat) { BalanceReportAccount balanceReportAccount = new BalanceReportAccountImpl(); + balanceReportAccount.setFormatter(bigDecimalFormat); + String accountNumber = account.getAccountNumber(); accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); balanceReportAccount.setAccountNumber(accountNumber); @@ -178,7 +182,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BigDecimal credit = BigDecimal.ZERO; BigDecimal debit = BigDecimal.ZERO; - BigDecimal solde = BigDecimal.ZERO; + BigDecimal sold = BigDecimal.ZERO; List<Object[]> results = entryTopiaDao.getDebitCreditOfBalancedTransaction(account, beginDate, endDate); @@ -195,21 +199,21 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal } } - // set the amounts and solde - //solde = debit - credit - solde = solde.add(debit); - solde = solde.subtract(credit); + // set the amounts and sold + //sold = debit - credit + sold = sold.add(debit); + sold = sold.subtract(credit); - if (solde.compareTo(BigDecimal.ZERO) == 1) { - balanceReportAccount.setSoldeDebit(String.valueOf(solde.abs())); - balanceReportAccount.setSoldeCredit(""); + if (sold.compareTo(BigDecimal.ZERO) == 1) { + balanceReportAccount.setSoldeDebit(sold.abs()); + balanceReportAccount.setSoldeCredit(BigDecimal.ZERO); } else { - balanceReportAccount.setSoldeCredit(solde.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(solde.abs())); - balanceReportAccount.setSoldeDebit(""); + balanceReportAccount.setSoldeCredit(sold.abs()); + balanceReportAccount.setSoldeDebit(BigDecimal.ZERO); } - balanceReportAccount.setAmountCredit(credit.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(credit)); - balanceReportAccount.setAmountDebit(debit.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(debit)); + balanceReportAccount.setAmountCredit(credit); + balanceReportAccount.setAmountDebit(debit); return balanceReportAccount; } 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 af5412d..6b0550c 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 @@ -30,6 +30,7 @@ import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import java.math.BigDecimal; +import java.text.DecimalFormat; import java.util.Collection; import java.util.Date; import java.util.List; @@ -50,8 +51,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @Override public boolean apply(GeneralEntryBookEntry generalEntryBookEntry) { - boolean result = StringUtils.isBlank(generalEntryBookEntry.getDebit()) && - StringUtils.isBlank(generalEntryBookEntry.getCredit()); + boolean result = BigDecimal.ZERO.equals(generalEntryBookEntry.getDebit()) && + BigDecimal.ZERO.equals(generalEntryBookEntry.getCredit()); return result; } }; @@ -72,9 +73,9 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple protected static final String TITLE = "Journal Général Provisoire"; @Override - public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, String currency) { + public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat bigDecimalFormat) { String entryBookPeriodReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryBookPeriodReportPath(); - String generalEntryBookEntryBookMainReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryBookMainReportPath(); + String generalEntryBookEntryBookReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookGeneralEntryBookEntryReportPath(); DocumentReport result = new DocumentReportImpl(); try { @@ -150,8 +151,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple subAmountDebit= subAmountDebit.add(entryBookDebit); subAmountCredit = subAmountCredit.add(entryBookCredit); - generalEntryBookEntry.setDebit(entryBookDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookDebit.toPlainString()); - generalEntryBookEntry.setCredit(entryBookCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookCredit.toPlainString()); + generalEntryBookEntry.setDebit(entryBookDebit); + generalEntryBookEntry.setCredit(entryBookCredit); } Collection<GeneralEntryBookEntry> generalEntryBookEntries = generalEntryBookEntryByEntryBookCode.values(); @@ -160,9 +161,9 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { EntryBookPeriodReport entryBookPeriodReport = new EntryBookPeriodReportImpl(); entryBookPeriodReport.setPeriod(financialPeriod.getBeginDate()); - entryBookPeriodReport.setSubReportPath(generalEntryBookEntryBookMainReportPath); - entryBookPeriodReport.setSoldeDebit(subAmountDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : subAmountDebit.toPlainString()); - entryBookPeriodReport.setSoldeCredit(subAmountCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : subAmountCredit.toPlainString()); + entryBookPeriodReport.setSubReportPath(generalEntryBookEntryBookReportPath); + entryBookPeriodReport.setSoldeDebit(subAmountDebit); + entryBookPeriodReport.setSoldeCredit(subAmountCredit); entryBookPeriodReport.setGeneralEntryBookEntry(Lists.newArrayList(generalEntryBookEntries)); result.addEntryBookPeriodReport(entryBookPeriodReport); @@ -172,8 +173,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple } - result.setSoldeDebit(amountDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : amountDebit.toPlainString()); - result.setSoldeCredit(amountCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : amountCredit.toPlainString()); + result.setSoldeDebit(amountDebit); + result.setSoldeCredit(amountCredit); } } catch (Exception ex) { log.error("Can't create document", ex); 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 658d2d3..5f78586 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 @@ -157,29 +157,29 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo if (financialPeriodDebit.compareTo(BigDecimal.ZERO) != 0 || financialPeriodCredit.compareTo(BigDecimal.ZERO) != 0) { - financialPeriodReport.setDebit(financialPeriodDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : financialPeriodDebit.toPlainString()); - financialPeriodReport.setCredit(financialPeriodCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : financialPeriodCredit.toPlainString()); + financialPeriodReport.setDebit(financialPeriodDebit); + financialPeriodReport.setCredit(financialPeriodCredit); financialPeriodReport.setEntryBookCode(entryBook.getCode()); entryBookReport.addFinancialPeriodReport(financialPeriodReport); entryBookSoldeDebit = entryBookSoldeDebit.add(financialPeriodDebit); entryBookSoldeCredit = entryBookSoldeCredit.add(financialPeriodCredit); - financialPeriodReport.setSoldeDebit(entryBookSoldeDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeDebit.toPlainString()); - financialPeriodReport.setSoldeCredit(entryBookSoldeCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeCredit.toPlainString()); + financialPeriodReport.setSoldeDebit(entryBookSoldeDebit); + financialPeriodReport.setSoldeCredit(entryBookSoldeCredit); } } if (entryBookSoldeDebit.compareTo(BigDecimal.ZERO) != 0 || entryBookSoldeCredit.compareTo(BigDecimal.ZERO) != 0) { - entryBookReport.setSoldeDebit(entryBookSoldeDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeDebit.toPlainString()); - entryBookReport.setSoldeCredit(entryBookSoldeCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : entryBookSoldeCredit.toPlainString()); + entryBookReport.setSoldeDebit(entryBookSoldeDebit); + entryBookReport.setSoldeCredit(entryBookSoldeCredit); documentReport.addEntryBookReport(entryBookReport); documentReportDebit = documentReportDebit.add(entryBookSoldeDebit); documentReportCredit = documentReportCredit.add(entryBookSoldeCredit); } } - documentReport.setSoldeDebit(documentReportDebit.compareTo(BigDecimal.ZERO) == 0 ? "" : documentReportDebit.toPlainString()); - documentReport.setSoldeCredit(documentReportCredit.compareTo(BigDecimal.ZERO) == 0 ? "" : documentReportCredit.toPlainString()); + documentReport.setSoldeDebit(documentReportDebit); + documentReport.setSoldeCredit(documentReportCredit); } } catch (Exception ex) { log.error("Can't create document", ex); diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java index 6b6df1a..44c521e 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java @@ -23,8 +23,6 @@ package org.chorem.lima.beans; */ -import org.apache.commons.lang3.StringUtils; - import java.math.BigDecimal; public class BalanceReportAccountImpl extends BalanceReportAccount { @@ -34,28 +32,21 @@ public class BalanceReportAccountImpl extends BalanceReportAccount { public void addSubAccount(BalanceReportAccount subAccount) { // we only add account that have values - if (StringUtils.isNotBlank(subAccount.getAmountDebit()) && StringUtils.isNotBlank(subAccount.getAmountCredit())) { + if (BigDecimal.ZERO.equals(subAccount.getAmountDebit()) && BigDecimal.ZERO.equals(subAccount.getAmountCredit())) { getSubAccounts().add(subAccount); - BigDecimal newAmountDebit = StringUtils.isBlank(this.amountDebit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.amountDebit)); - BigDecimal newAmountCredit = StringUtils.isBlank(this.amountCredit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.amountCredit)); - BigDecimal newSoldeDebit = StringUtils.isBlank(this.soldeDebit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.soldeDebit)); - BigDecimal newSoldeCredit = StringUtils.isBlank(this.soldeCredit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.soldeCredit)); - - if (StringUtils.isNotBlank(subAccount.getAmountDebit())) { - this.amountDebit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getAmountDebit())).add(newAmountDebit)); - } - - if (StringUtils.isNotBlank(subAccount.getAmountCredit())) { - this.amountCredit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getAmountCredit())).add(newAmountCredit)); - } - - if (StringUtils.isNotBlank(subAccount.getSoldeDebit())) { - this.soldeDebit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getSoldeDebit())).add(newSoldeDebit)); - } - if (StringUtils.isNotBlank(subAccount.getSoldeCredit())) { - this.soldeCredit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getSoldeCredit())).add(newSoldeCredit)); - } + BigDecimal newAmountDebit = this.amountDebit; + BigDecimal newAmountCredit = this.amountCredit; + BigDecimal newSoldeDebit = this.soldeDebit; + BigDecimal newSoldeCredit = this.soldeCredit; + + this.amountDebit = subAccount.getAmountDebit().add(newAmountDebit); + + this.amountCredit = subAccount.getAmountCredit().add(newAmountCredit); + + this.soldeDebit = subAccount.getSoldeDebit().add(newSoldeDebit); + + this.soldeCredit = subAccount.getSoldeCredit().add(newSoldeCredit); } // firePropertyChange(PROPERTY_SUB_ACCOUNTS, null, subAccount); diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index ff4bbc6..bdf1867 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml index 0c9d09b..2939f3c 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml @@ -1,275 +1,275 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T14:46:37 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T14:14:01 --> <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="Arial" fontSize="8"/> - <style name="Bold" fontName="Arial" fontSize="8"/> - <style name="Oblique" fontName="Monospaced" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" 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="fromAccount" class="java.lang.String"/> - <field name="toAccount" class="java.lang.String"/> - <field name="accounts" class="java.util.List"/> - <field name="subReportPath" class="java.lang.String"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <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="25" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> - </textField> - <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" forecolor="#D0B48E" 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 x="0" y="0" width="40" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> - <property name="local_mesure_unitwidth" value="pixel"/> - </reportElement> - <box> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Compte]]></text> - </staticText> - <staticText> - <reportElement x="40" y="0" width="250" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - </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[Intitulé]]></text> - </staticText> - <staticText> - <reportElement x="290" y="0" width="144" height="10" forecolor="#804000" uuid="caadc464-ad77-4b53-b5cb-11e29c0a18ce"> - <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[Total Période]]></text> - </staticText> - <staticText> - <reportElement x="290" y="10" width="72" height="10" forecolor="#804000" uuid="e6928f86-fe5c-4c14-996c-19728e6abf44"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <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="362" y="10" width="72" height="10" forecolor="#804000" uuid="13dd0f7b-3331-4ca4-8ef8-5468fb65fc3e"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> - <staticText> - <reportElement x="434" y="0" width="144" height="10" 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[Solde Période]]></text> - </staticText> - <staticText> - <reportElement x="434" y="10" width="72" height="10" 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="10" width="72" height="10" 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> - <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[JasperCompileManager.compileReport($F{subReportPath})]]></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> + <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="Arial" fontSize="8"/> + <style name="Bold" fontName="Arial" fontSize="8"/> + <style name="Oblique" fontName="Monospaced" fontSize="8"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" 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="fromAccount" class="java.lang.String"/> + <field name="toAccount" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="subReportPath" class="java.lang.String"/> + <field name="companyName" class="java.lang.String"/> + <field name="title" class="java.lang.String"/> + <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="25" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> + </textField> + <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" forecolor="#D0B48E" 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 x="0" y="0" width="40" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <property name="local_mesure_unitwidth" value="pixel"/> + </reportElement> + <box> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Compte]]></text> + </staticText> + <staticText> + <reportElement x="40" y="0" width="250" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + </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[Intitulé]]></text> + </staticText> + <staticText> + <reportElement x="290" y="0" width="144" height="10" forecolor="#804000" uuid="caadc464-ad77-4b53-b5cb-11e29c0a18ce"> + <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[Total Période]]></text> + </staticText> + <staticText> + <reportElement x="290" y="10" width="72" height="10" forecolor="#804000" uuid="e6928f86-fe5c-4c14-996c-19728e6abf44"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <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="362" y="10" width="72" height="10" forecolor="#804000" uuid="13dd0f7b-3331-4ca4-8ef8-5468fb65fc3e"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + <staticText> + <reportElement x="434" y="0" width="144" height="10" 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[Solde Période]]></text> + </staticText> + <staticText> + <reportElement x="434" y="10" width="72" height="10" 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="10" width="72" height="10" 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> + <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[JasperCompileManager.compileReport($F{subReportPath})]]></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> diff --git a/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml index d8bdb41..9cb3b94 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -1,128 +1,129 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T14:43:40 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T14:01:44 --> <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="21" 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"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="accountNumber" class="java.lang.String"/> - <field name="label" class="java.lang.String"/> - <field name="amountDebit" class="java.lang.String"/> - <field name="amountCredit" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <field name="subAccounts" class="java.util.List"/> - <field name="balanceSubAccountsReportPath" class="java.lang.String"/> - <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> - </variable> - <detail> - <band height="10" splitType="Stretch"> - <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> - </subreport> - </band> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </band> - </detail> - <columnFooter> - <band height="1"> - <line> - <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#804000" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> - </line> - </band> - </columnFooter> + <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"/> + <style name="Default" isDefault="true" fontName="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.math.BigDecimal"/> + <field name="amountCredit" class="java.math.BigDecimal"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="subAccounts" class="java.util.List"/> + <field name="balanceSubAccountsReportPath" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> + </subreport> + </band> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{amountDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{amountCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountCredit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="1"> + <line> + <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#804000" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> + </line> + </band> + </columnFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml index d4d9bfb..b5df64e 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -1,109 +1,118 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-20T14:38:56 --> -<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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> - <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"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="accountNumber" class="java.lang.String"/> - <field name="label" class="java.lang.String"/> - <field name="amountDebit" class="java.lang.String"/> - <field name="amountCredit" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <detail> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </band> - </detail> +<!-- 2015-01-14T14:15:11 --> +<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="10" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <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="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.math.BigDecimal"/> + <field name="amountCredit" class="java.math.BigDecimal"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{amountDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{amountCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountCredit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> + </textField> + </band> + </detail> </jasperReport> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml index 75a2866..763c01f 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml @@ -1,319 +1,320 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-18T18:27:11 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T11:33:46 --> <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="Arial" fontSize="8"/> - <style name="Bold" fontName="Arial" fontSize="8"/> - <style name="Oblique" fontName="Monospaced" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" 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="entryBookPeriodReport" class="java.util.List"/> - <field name="subReportPath" class="java.lang.String"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <variable name="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBookPeriodReport})]]></variableExpression> - </variable> - <group name="entryBookPeriodReport"/> - <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="25" 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 x="0" y="0" width="40" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> - <property name="local_mesure_unitwidth" value="pixel"/> - </reportElement> - <box> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - </textElement> - <text><![CDATA[Journal]]></text> - </staticText> - <staticText> - <reportElement x="40" y="0" width="394" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - </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[Intitulé]]></text> - </staticText> - <staticText> - <reportElement x="434" y="0" width="144" height="10" 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[Total Période]]></text> - </staticText> - <staticText> - <reportElement x="434" y="10" width="72" height="10" 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="10" width="72" height="10" 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{entryBookPeriodReport}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></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> - <lastPageFooter> - <band height="30"> - <frame> - <reportElement style="Default" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="07f5ee06-0c59-46c6-b23e-052974f98f2f"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> - <reportElement x="0" y="0" width="434" height="20" forecolor="#736343" uuid="9e826238-b4eb-45d6-a470-859288447fad"> - <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"/> - <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="Left" verticalAlignment="Middle"> - <font size="12" isBold="true" isItalic="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="40"/> - </textElement> - <textFieldExpression><![CDATA["Total du Journal Général"]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="bfddf750-3e4a-459a-8f09-7f617d0112e8"> - <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" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="12" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="eb9dc63a-0873-43de-91a5-6d54d0748b3d"> - <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" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="12" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </frame> - <textField isBlankWhenNull="false"> - <reportElement x="0" y="20" width="288" height="10" uuid="87361454-c898-41a6-8d56-2cd13115ba14"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> - <textElement textAlignment="Right"> - <paragraph lineSpacingSize="0.0"/> - </textElement> - <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> - </textField> - <textField evaluationTime="Report"> - <reportElement x="288" y="20" width="287" height="10" uuid="3528c1ce-80bd-4714-948d-493b0bba736a"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> - <textElement textAlignment="Left"> - <paragraph lineSpacingSize="0.0"/> - </textElement> - <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> - </textField> - </band> - </lastPageFooter> + <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="Arial" fontSize="8"/> + <style name="Bold" fontName="Arial" fontSize="8"/> + <style name="Oblique" fontName="Monospaced" fontSize="8"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" 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="entryBookPeriodReport" class="java.util.List"/> + <field name="subReportPath" class="java.lang.String"/> + <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="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBookPeriodReport})]]></variableExpression> + </variable> + <group name="entryBookPeriodReport"/> + <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="25" 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 x="0" y="0" width="40" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <property name="local_mesure_unitwidth" value="pixel"/> + </reportElement> + <box> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Journal]]></text> + </staticText> + <staticText> + <reportElement x="40" y="0" width="394" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + </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[Intitulé]]></text> + </staticText> + <staticText> + <reportElement x="434" y="0" width="144" height="10" 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[Total Période]]></text> + </staticText> + <staticText> + <reportElement x="434" y="10" width="72" height="10" 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="10" width="72" height="10" 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{entryBookPeriodReport}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></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> + <lastPageFooter> + <band height="30"> + <frame> + <reportElement style="Default" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="07f5ee06-0c59-46c6-b23e-052974f98f2f"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> + <reportElement x="0" y="0" width="434" height="20" forecolor="#736343" uuid="9e826238-b4eb-45d6-a470-859288447fad"> + <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"/> + <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="Left" verticalAlignment="Middle"> + <font size="12" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA["Total du Journal Général"]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="bfddf750-3e4a-459a-8f09-7f617d0112e8"> + <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" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="12" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="eb9dc63a-0873-43de-91a5-6d54d0748b3d"> + <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" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="12" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> + </textField> + </frame> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="20" width="288" height="10" uuid="87361454-c898-41a6-8d56-2cd13115ba14"> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement x="288" y="20" width="287" height="10" uuid="3528c1ce-80bd-4714-948d-493b0bba736a"> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index fb262e5..81361d0 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -1,137 +1,146 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-18T18:07:35 --> -<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="21" 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"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <field name="generalEntryBookEntry" class="java.util.List"/> - <field name="subReportPath" class="java.lang.String"/> - <field name="period" class="java.util.Date"/> - <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalEntryBookEntry})]]></variableExpression> - </variable> - <detail> - <band height="10"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <frame> - <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> - <reportElement x="0" y="0" width="578" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> - <property name="local_mesure_unity" value="pixel"/> - <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="Left" verticalAlignment="Middle"> - <font size="8" isBold="true" isItalic="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="40"/> - </textElement> - <textFieldExpression><![CDATA["Mois de " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> - </textField> - </frame> - </band> - <band height="10" splitType="Stretch"> - <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> - </subreport> - </band> - <band height="10" splitType="Stretch"> - <frame> - <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FFFFFF" backcolor="#FFFFFF" uuid="571d1774-22c4-4ab4-901b-7470c74f0405"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> - <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="dc68030b-597d-47b5-8be9-eecfdde17f5e"> - <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="true" isItalic="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="40"/> - </textElement> - <textFieldExpression><![CDATA["Sous-total " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <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 fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <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 fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </frame> - </band> - </detail> - <columnFooter> - <band height="1"> - <line> - <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#FDCA97" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> - </line> - </band> - </columnFooter> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T14:58:26 --> +<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="20" 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="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="generalEntryBookEntry" class="java.util.List"/> + <field name="subReportPath" class="java.lang.String"/> + <field name="period" class="java.util.Date"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalEntryBookEntry})]]></variableExpression> + </variable> + <detail> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> + <reportElement x="0" y="0" width="578" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"> + <property name="local_mesure_unity" value="pixel"/> + <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="Left" verticalAlignment="Middle"> + <font size="8" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA["Mois de " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + </textField> + </frame> + </band> + <band height="10" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> + </subreport> + </band> + <band height="10" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FFFFFF" backcolor="#FFFFFF" uuid="571d1774-22c4-4ab4-901b-7470c74f0405"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" 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 isBlankWhenNull="true"> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="dc68030b-597d-47b5-8be9-eecfdde17f5e"> + <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="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA["Sous-total " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <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 fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <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 fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </detail> + <columnFooter> + <band height="1"> + <line> + <reportElement style="Default" x="0" y="0" width="578" height="1" forecolor="#FDCA97" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> + </line> + </band> + </columnFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml index 7c84179..7e53691 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml @@ -1,81 +1,82 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2014-11-18T18:24:29 --> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T14:57:39 --> <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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> - <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"/> - <style name="Default" isDefault="true" fontName="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="code" class="java.lang.String"/> - <field name="libelle" class="java.lang.String"/> - <field name="debit" class="java.lang.String"/> - <field name="credit" class="java.lang.String"/> - <detail> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{code}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="394" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - <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.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> - </textField> - </band> - </detail> + <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"/> + <style name="Default" isDefault="true" fontName="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="code" class="java.lang.String"/> + <field name="libelle" 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"/> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{code}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="394" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + <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.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <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="false"> + <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <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> </jasperReport> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml index 8808273..e5320fe 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-09T11:11:04 --> +<!-- 2015-01-14T11:17:08 --> <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"/> @@ -18,8 +18,9 @@ <field name="subReportPath" class="java.lang.String"/> <field name="companyName" class="java.lang.String"/> <field name="title" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" 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="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBookReport})]]></variableExpression> </variable> @@ -319,7 +320,7 @@ <font fontName="Courier 10 Pitch" size="12" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement style="Default" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"> @@ -336,7 +337,7 @@ <font fontName="Courier 10 Pitch" size="12" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> </textField> </frame> <textField isBlankWhenNull="false"> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml index b5b4e2e..a83354f 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-13T10:25:20 --> +<!-- 2015-01-14T11:21:54 --> <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="50" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -10,12 +10,13 @@ <queryString> <![CDATA[]]> </queryString> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> <field name="financialPeriodReport" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="code" class="java.lang.String"/> <field name="libelle" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{financialPeriodReport})]]></variableExpression> </variable> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml index 8a0b4a8..cf9f593 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-13T15:57:01 --> +<!-- 2015-01-14T11:21:00 --> <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="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -18,15 +18,14 @@ <queryString> <![CDATA[]]> </queryString> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> <field name="transaction" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="period" class="java.util.Date"/> <field name="libelle" class="java.lang.String"/> - <field name="debit" class="java.lang.String"/> - <field name="credit" class="java.lang.String"/> <field name="entryBookCode" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{transaction})]]></variableExpression> </variable> @@ -247,7 +246,7 @@ <font fontName="Courier 10 Pitch" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> @@ -264,7 +263,7 @@ <font fontName="Courier 10 Pitch" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml b/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml index 7ff7234..a609a8e 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml +++ b/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-13T15:57:19 --> +<!-- 2015-01-14T11:24:25 --> <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="30" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -17,7 +17,7 @@ <field name="account" class="java.lang.String"/> <field name="voucher" class="java.lang.String"/> <field name="formatter" class="java.text.DecimalFormat"/> - <variable name="EntryBookDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variable name="entryBookDebitSolde" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> @@ -268,7 +268,7 @@ <font fontName="Courier 10 Pitch" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookDebitSolde}) : ""]]></textFieldExpression> </textField> <textField> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="a7b19080-fcc5-407b-ae5c-20a85afd363e"> 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/action/DocumentService.java index 2b014a9..70795ff 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -676,7 +676,7 @@ public class DocumentService { public DocumentReport createBalanceDocuments(Date beginDate, Date endDate, String fromToAccount, String currency) { - DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, currency); + DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, currency, BigDecimalToString.getDecimalFormat()); reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.BALANCE, BALANCE_FILE_PATH, Lists.newArrayList(report)); return report; } @@ -684,7 +684,7 @@ public class DocumentService { //############## General EntryBook ############# public DocumentReport createGeneralEntryBooksDocuments(Date beginDate, Date endDate, String currency) { - DocumentReport report = generalEntryBookReportService.getEntryBookDocumentReport(beginDate, endDate, currency); + DocumentReport report = generalEntryBookReportService.getEntryBookDocumentReport(beginDate, endDate, currency, BigDecimalToString.getDecimalFormat()); reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.GENERAL_ENTRYBOOK, GENERAL_ENTRY_BOOK_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); return report; } -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit c34e00d99d068643a358dcf1249d59220e240619 Author: dcosse <japbiw74> Date: Wed Jan 14 15:12:07 2015 +0100 refs #769 set BigDecimal format for general entry book report --- .../lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java | 3 +++ .../main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml | 2 +- .../main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml | 2 +- .../generalEntryBook/GeneralEntryBookEntryReport.jrxml | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) 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 6b0550c..70fef04 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 @@ -90,6 +90,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple result.setFromDate(beginDate); result.setToDate(endDate); result.setSubReportPath(entryBookPeriodReportPath); + result.setFormatter(bigDecimalFormat); List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(beginDate, endDate); @@ -116,6 +117,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple GeneralEntryBookEntry generalEntryBookEntry = generalEntryBookEntryByEntryBookCode.get(entryBookCode); if (generalEntryBookEntry == null) { generalEntryBookEntry = new GeneralEntryBookEntryImpl(); + generalEntryBookEntry.setFormatter(bigDecimalFormat); generalEntryBookEntry.setCode(closedPeriodicEntryBook.getEntryBook().getCode()); generalEntryBookEntry.setLibelle(closedPeriodicEntryBook.getEntryBook().getLabel()); generalEntryBookEntryByEntryBookCode.put(entryBookCode, generalEntryBookEntry); @@ -160,6 +162,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { EntryBookPeriodReport entryBookPeriodReport = new EntryBookPeriodReportImpl(); + entryBookPeriodReport.setFormatter(bigDecimalFormat); entryBookPeriodReport.setPeriod(financialPeriod.getBeginDate()); entryBookPeriodReport.setSubReportPath(generalEntryBookEntryBookReportPath); entryBookPeriodReport.setSoldeDebit(subAmountDebit); diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml index 763c01f..23c6cb0 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:33:46 --> +<!-- 2015-01-14T15:09:41 --> <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"/> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index 81361d0..03f40b2 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:58:26 --> +<!-- 2015-01-14T15:09:41 --> <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="20" 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"/> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml index 7e53691..44b60d8 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:57:39 --> +<!-- 2015-01-14T15:09:41 --> <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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -49,7 +49,7 @@ </textElement> <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="false"> + <textField isBlankWhenNull="true"> <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -63,7 +63,7 @@ </textElement> <textFieldExpression><![CDATA[new Boolean($F{debit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debit}) : ""]]></textFieldExpression> </textField> - <textField isBlankWhenNull="false"> + <textField isBlankWhenNull="true"> <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit d93ebd03805fae66175b55c2a9ac113cceab349e Author: dcosse <japbiw74> Date: Wed Jan 14 16:00:56 2015 +0100 refs #769 fix Balance report fill-up --- .../lima/business/ejb/report/BalanceReportServiceImpl.java | 1 + .../java/org/chorem/lima/beans/BalanceReportAccountImpl.java | 10 +++++----- 2 files changed, 6 insertions(+), 5 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 bde32b9..5173f2c 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 @@ -146,6 +146,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceReportAccountImpl classAccount = accountsByClasses.get(accountClass); if (classAccount == null) { classAccount = new BalanceReportAccountImpl(); + classAccount.setFormatter(bigDecimalFormat); classAccount.setBalanceSubAccountsReportPath(BALANCE_SUB_ACCOUNTS_REPORT_PATH); classAccount.setSubAccounts(new ArrayList<BalanceReportAccount>()); classAccount.setAccountNumber(""); diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java index 44c521e..fbb88db 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java @@ -32,13 +32,13 @@ public class BalanceReportAccountImpl extends BalanceReportAccount { public void addSubAccount(BalanceReportAccount subAccount) { // we only add account that have values - if (BigDecimal.ZERO.equals(subAccount.getAmountDebit()) && BigDecimal.ZERO.equals(subAccount.getAmountCredit())) { + if (subAccount.getAmountDebit() != null && subAccount.getAmountCredit() != null) { getSubAccounts().add(subAccount); - BigDecimal newAmountDebit = this.amountDebit; - BigDecimal newAmountCredit = this.amountCredit; - BigDecimal newSoldeDebit = this.soldeDebit; - BigDecimal newSoldeCredit = this.soldeCredit; + BigDecimal newAmountDebit = this.amountDebit == null ? BigDecimal.ZERO : this.amountDebit; + BigDecimal newAmountCredit = this.amountCredit == null ? BigDecimal.ZERO : this.amountCredit; + BigDecimal newSoldeDebit = this.soldeDebit == null ? BigDecimal.ZERO : this.soldeDebit; + BigDecimal newSoldeCredit = this.soldeCredit == null ? BigDecimal.ZERO : this.soldeCredit; this.amountDebit = subAccount.getAmountDebit().add(newAmountDebit); -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit d7a7b32a38f4943674ab3bd14b50b662108dcdeb Author: dcosse <japbiw74> Date: Wed Jan 21 14:39:42 2015 +0100 refs #769 Mise à jour des rapports --- .../api/report/GeneralEntryBookReportService.java | 2 +- .../business/api/report/LedgerReportService.java | 3 +- .../report/ProvisionalEntryBookReportService.java | 2 +- .../chorem/lima/business/LimaServiceConfig.java | 184 +++++++------ .../lima/business/ejb/OptionsServiceImpl.java | 24 +- .../ejb/report/BalanceReportServiceImpl.java | 74 ++--- .../report/GeneralEntryBookReportServiceImpl.java | 48 ++-- .../ejb/report/LedgerReportServiceImpl.java | 3 +- .../ProvisionalEntryBookReportServiceImpl.java | 24 +- .../resources/i18n/lima-business_en_GB.properties | 12 +- .../resources/i18n/lima-business_fr_FR.properties | 22 +- .../lima/business/EntryBookServiceImplTest.java | 9 +- ...ortAccountImpl.java => BalanceAccountImpl.java} | 4 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 54041 -> 55585 bytes .../src/main/java/org/chorem/lima/LimaMain.java | 26 +- .../main/java/org/chorem/lima/LimaSwingConfig.java | 93 +++---- .../resources/i18n/lima-swing_en_GB.properties | 11 + .../resources/i18n/lima-swing_fr_FR.properties | 17 ++ .../jasperreports/accounts/AccountReport.jrxml | 161 ----------- .../balance/BalanceReportAccountReport.jrxml | 90 +----- .../balance/BalanceSubAccountsReport.jrxml | 291 +++++++++++++++++++- .../{BalanceReport.jrxml => DocumentReport.jrxml} | 12 +- .../DocumentReport.jrxml} | 12 +- .../EntryBookReport.jrxml | 6 +- .../FinancialPeriodReport.jrxml | 6 +- .../TransactionReport.jrxml | 2 +- ...ryBookMainReport.jrxml => DocumentReport.jrxml} | 10 +- .../generalEntryBook/EntryBookPeriodReport.jrxml | 10 +- .../GeneralEntryBookEntryReport.jrxml | 2 +- .../DocumentReport.jrxml} | 138 +++++----- .../jasperreports/ledger/LedgerPeriodReport.jrxml | 301 +++++++++++++++++++++ .../chorem/lima/web/action/DocumentService.java | 24 +- .../lima/web/action/balance/ReportBuilder.java | 12 +- .../chorem/lima/web/service/HttpServerService.java | 7 +- 34 files changed, 1014 insertions(+), 628 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java index 7623053..134eaf0 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/GeneralEntryBookReportService.java @@ -18,5 +18,5 @@ public interface GeneralEntryBookReportService { * @param currency the currency used * @return the entryBook beans */ - DocumentReport getEntryBookDocumentReport(Date from, Date to, String currency, DecimalFormat bigDecimalFormat); + DocumentReport getGeneralEntryBookDocumentReport(Date from, Date to, String currency, DecimalFormat bigDecimalFormat); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java index f189ce5..c63c203 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/LedgerReportService.java @@ -2,6 +2,7 @@ package org.chorem.lima.business.api.report; import org.chorem.lima.beans.DocumentReport; +import java.text.DecimalFormat; import java.util.Date; /** @@ -16,5 +17,5 @@ public interface LedgerReportService { * @param currency current currency * @return */ - DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency); + DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat decimalFormat); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java index dfa1b33..b1930ba 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/ProvisionalEntryBookReportService.java @@ -19,5 +19,5 @@ public interface ProvisionalEntryBookReportService { * @param currency current currency * @return */ - DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat); + DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index 1b43a09..ef75c48 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -219,159 +219,163 @@ public class LimaServiceConfig { // ** REPORT PART ** - public File getReportsDir() { - String reportsDirPath = config.getOption(ServiceConfigOption.REPORTS_DIR.key); + public File getReportsModelDir() { + String reportsDirPath = config.getOption(ServiceConfigOption.REPORTS_MODEL_DIR.key); File result = new File(reportsDirPath); return result; } - public void setReportsDir(String url) { - config.setOption(ServiceConfigOption.REPORTS_DIR.key, url); + public void setReportsModelDir(String url) { + config.setOption(ServiceConfigOption.REPORTS_MODEL_DIR.key, url); config.saveForUser(); } - public String getAccountReportPath() { - String vatPDFUrl = config.getOption(ServiceConfigOption.ACCOUNT_REPORT_PATH.getKey()); + public String getAccountReportModelPath() { + String vatPDFUrl = config.getOption(ServiceConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); return vatPDFUrl; } - public void setAccountReportPath(String path) { - config.setOption(ServiceConfigOption.ACCOUNT_REPORT_PATH.key, path); + public int getScale() { + return config.getOptionAsInt(ServiceConfigOption.SCALE.key); + } + + public void setScale(String locale) { + config.setOption(ServiceConfigOption.SCALE.key, locale); config.saveForUser(); } - public String getBalanceReportPath() { - String result = config.getOption(ServiceConfigOption.BALANCE_REPORT_PATH.getKey()); - return result; + public boolean getCurrency() { + return config.getOptionAsBoolean(ServiceConfigOption.CURRENCY.key); } - public void setBalanceReportPath(String path) { - config.setOption(ServiceConfigOption.BALANCE_REPORT_PATH.key, path); + public void setCurrency(String locale) { + config.setOption(ServiceConfigOption.CURRENCY.key, locale); config.saveForUser(); } - public String getBalanceReportAccountReportPath() { - String result = config.getOption(ServiceConfigOption.BALANCE_REPORT_ACCOUNT_REPORT_PATH.getKey()); - return result; + public char getDecimalSeparator() { + char decimalSeparator = config.getOption(ServiceConfigOption.DECIMAL_SEPARATOR.key).charAt(0); + LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); + return decimalSeparator; } - public void setBalanceReportAccountReportPath(String path) { - config.setOption(ServiceConfigOption.BALANCE_REPORT_ACCOUNT_REPORT_PATH.key, path); + public void setDecimalSeparator(String locale) { + config.setOption(ServiceConfigOption.DECIMAL_SEPARATOR.key, locale); config.saveForUser(); } - public String getBalanceSubAccountReportPath() { - String result = config.getOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_PATH.getKey()); - return result; + + public char getThousandSeparator() { + return config.getOption(ServiceConfigOption.THOUSAND_SEPARATOR.key).charAt(0); } - public void setBalanceSubAccountReportPath(String path) { - config.setOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_PATH.key, path); + public void setThousandSeparator(String locale) { + config.setOption(ServiceConfigOption.THOUSAND_SEPARATOR.key, locale); config.saveForUser(); } - public String getGeneralEntryBookEntryBookMainReportPath() { - String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); - return result; - } - public void setGeneralEntryBookEntryBookMainReportPath(String path) { - config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key, path); + public void setAccountReportModelPath(String path) { + config.setOption(ServiceConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getGeneralEntryBookEntryBookPeriodReportPath() { - String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.getKey()); + + public String getBalanceDocumentReportModelPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.getKey()); return result; } - public void setGeneralEntryBookEntryBookPeriodReportPath(String path) { - config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.key, path); + public void setBalanceDocumentReportModelPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getGeneralEntryBookGeneralEntryBookEntryReportPath() { - String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.getKey()); + public String getBalanceAccountReportModelPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.getKey()); return result; } - public void setGeneralEntryBookGeneralEntryBookEntryReportPath(String path) { - config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.key, path); + public void setBalanceAccountReportModelPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getProvisionalEntryBookEntryBookMainReportPath() { - String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); + + public String getBalanceSubAccountReportModelPath() { + String result = config.getOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.getKey()); return result; } - public void setProvisionalEntryBookEntryBookMainReportPath(String path) { - config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key, path); + public void setBalanceSubAccountReportModelPath(String path) { + config.setOption(ServiceConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getProvisionalEntryBookEntryBookReportPath() { - String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.getKey()); + + public String getEntryBookDocumentReportModelPath() { + String result = config.getOption(ServiceConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.getKey()); return result; } - public void setProvisionalEntryBookEntryBookReportPath(String path) { - config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.key, path); + public void setEntryBookDocumentReportModelPath(String path) { + config.setOption(ServiceConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getProvisionalEntryBookFinancialPeriodReportPath() { - String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.getKey()); + public String getEntryBookEntryBookReportModelPath() { + String result = config.getOption(ServiceConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.getKey()); return result; } - public void setProvisionalEntryBookFinancialPeriodReportPath(String path) { - config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.key, path); + public void setEntryBookEntryBookReportModelPath(String path) { + config.setOption(ServiceConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public String getProvisionalEntryBookTransactionReportPath() { - String result = config.getOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.getKey()); + public String getEntryBookFinancialPeriodReportModelPath() { + String result = config.getOption(ServiceConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.getKey()); return result; } - public void setProvisionalEntryBookTransactionReportPath(String path) { - config.setOption(ServiceConfigOption.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.key, path); + public void setEntryBookFinancialPeriodReportModelPath(String path) { + config.setOption(ServiceConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public int getScale() { - return config.getOptionAsInt(ServiceConfigOption.SCALE.key); + public String getEntryBookTransactionReportModelPath() { + String result = config.getOption(ServiceConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.getKey()); + return result; } - public void setScale(String locale) { - config.setOption(ServiceConfigOption.SCALE.key, locale); + public void setEntryBookTransactionReportModelPath(String path) { + config.setOption(ServiceConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public boolean getCurrency() { - return config.getOptionAsBoolean(ServiceConfigOption.CURRENCY.key); + public String getGeneralEntryBookDocumentReportModelPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.getKey()); + return result; } - public void setCurrency(String locale) { - config.setOption(ServiceConfigOption.CURRENCY.key, locale); + public void setGeneralEntryBookDocumentReportModelPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public char getDecimalSeparator() { - char decimalSeparator = config.getOption(ServiceConfigOption.DECIMAL_SEPARATOR.key).charAt(0); - LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); - return decimalSeparator; + public String getGeneralEntryBookReportModelPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.getKey()); + return result; } - public void setDecimalSeparator(String locale) { - config.setOption(ServiceConfigOption.DECIMAL_SEPARATOR.key, locale); + public void setGeneralEntryBookReportModelPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - public char getThousandSeparator() { - return config.getOption(ServiceConfigOption.THOUSAND_SEPARATOR.key).charAt(0); + public String getGeneralEntryBookEntryReportModelPath() { + String result = config.getOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.getKey()); + return result; } - public void setThousandSeparator(String locale) { - config.setOption(ServiceConfigOption.THOUSAND_SEPARATOR.key, locale); + public void setGeneralEntryBookEntryReportModelPath(String path) { + config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key, path); config.saveForUser(); } - // ** FIN REPORT PART ** @@ -392,22 +396,28 @@ public class LimaServiceConfig { SERVER_ADRESS("lima.serveraddress", n("lima.config.serveraddress.description"), "", String.class, false, false), VAT_PDF_URL("lima.report.vatpdfurl", n("lima.config.reportvatpdfurl.description"), "default", String.class, false, false), - REPORTS_DIR("lima.reports.dir",n("lima.config.reports.dir.description"),"${lima.data.dir}/reports", File.class, false, false), - ACCOUNT_REPORT_PATH("lima.accounts.accountReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml",String.class, false, false), - BALANCE_REPORT_PATH("lima.balance.balanceReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml",String.class, false, false), - BALANCE_REPORT_ACCOUNT_REPORT_PATH("lima.balance.balanceReportAccountReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml",String.class, false, false), - BALANCE_SUB_ACCOUNT_REPORT_PATH("lima.balance.balanceSubAccountReportPath",n("lima.config.documentReport.balanceReportAccount.description"), ROOT_PATH +"/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml",String.class, false, false), - GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.generalEntryBook.entryBookMainReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml", String.class, false, false), - GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH("lima.generalEntryBook.entryBookPeriodReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml", String.class, false, false), - GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH("lima.generalEntryBook.generalEntryBookEntryReportPath", "", ROOT_PATH +"/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml", String.class, false, false), - PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.provisionalEntryBook.entryBookMainReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml",String.class,false, false), - PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH("lima.provisionalEntryBook.entryBookReport","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml",String.class,false, false), - PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH("lima.provisionalEntryBook.financialPeriodReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml", String.class, false, false), - PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH("lima.provisionalEntryBook.transactionReportPath","", ROOT_PATH +"/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml",String.class, false, false), + 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"), ROOT_PATH +"/lima-web/src/main/jasperreports/accounts/DocumentReport.jrxml",String.class, false, false), + + BALANCE_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.balance.documentReportModelPath", n("lima.config.documentReport.balance.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/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"), ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml", String.class, false, false), + BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH("lima.config.documentReport.balance.balanceSubAccountReportModelPath", n("lima.config.documentReport.balance.balanceSubAccountReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml", String.class, false, false), + + GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.documentReportModelPath", n("lima.config.documentReport.generalEntrybook.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/DocumentReport.jrxml", String.class, false, false), + GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.generalEntryBookModelPath", n("lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml", String.class, false, false), + GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath", n("blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml", String.class, false, false), + + ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.documentReportModelPath", n("lima.config.documentReport.entrybook.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/DocumentReport.jrxml", String.class, false, false), + ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.entryBookModelPath", n("lima.config.documentReport.entrybook.entryBookModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/EntryBookReport.jrxml", String.class, false, false), + ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.financialPeriodModelPath", n("lima.config.documentReport.entrybook.financialPeriodModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml", String.class, false, false), + ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.transactionReportModelPath", n("lima.config.documentReport.entrybook.transactionReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml", String.class, false, false), + + SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), - CURRENCY("lima.config.currency","","false", Boolean.class, false, false), - DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator","",",",Character.class, false, false), - THOUSAND_SEPARATOR("lima.thousandSeparator",""," ",Character.class, false, false); + CURRENCY("lima.config.currency", "", "false", Boolean.class, false, false), + DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator", "", ",", Character.class, false, false), + THOUSAND_SEPARATOR("lima.thousandSeparator", "", " ", Character.class, false, false); private final String key; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java index 772d489..caf775e 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java @@ -46,62 +46,62 @@ public class OptionsServiceImpl extends AbstractLimaService implements OptionsSe @Override public void setReportsDir(String path) { - LimaServiceConfig.getInstance().setReportsDir(path); + LimaServiceConfig.getInstance().setReportsModelDir(path); } @Override public void setAccountReportPath(String path) { - LimaServiceConfig.getInstance().setAccountReportPath(path); + LimaServiceConfig.getInstance().setAccountReportModelPath(path); } @Override public void setBalanceReportPath(String path) { - LimaServiceConfig.getInstance().setBalanceReportPath(path); + LimaServiceConfig.getInstance().setBalanceDocumentReportModelPath(path); } @Override public void setBalanceReportAccountReportPath(String path) { - LimaServiceConfig.getInstance().setBalanceReportAccountReportPath(path); + LimaServiceConfig.getInstance().setBalanceAccountReportModelPath(path); } @Override public void setBalanceSubAccountReportPath(String path) { - LimaServiceConfig.getInstance().setBalanceSubAccountReportPath(path); + LimaServiceConfig.getInstance().setBalanceSubAccountReportModelPath(path); } @Override public void setGeneralEntryBookEntryBookMainReportPath(String path) { - LimaServiceConfig.getInstance().setGeneralEntryBookEntryBookMainReportPath(path); + LimaServiceConfig.getInstance().setGeneralEntryBookDocumentReportModelPath(path); } @Override public void setGeneralEntryBookPeriodReportPath(String path) { - LimaServiceConfig.getInstance().setGeneralEntryBookEntryBookPeriodReportPath(path); + LimaServiceConfig.getInstance().setGeneralEntryBookReportModelPath(path); } @Override public void setGeneralEntryBookGeneralEntryBookReportPath(String path) { - LimaServiceConfig.getInstance().setGeneralEntryBookGeneralEntryBookEntryReportPath(path); + LimaServiceConfig.getInstance().setGeneralEntryBookEntryReportModelPath(path); } @Override public void setProvisionalEntryBookEntryBookMainReportPath(String path) { - LimaServiceConfig.getInstance().setProvisionalEntryBookEntryBookMainReportPath(path); + LimaServiceConfig.getInstance().setEntryBookDocumentReportModelPath(path); } @Override public void setProvisionalEntryBookEntryBookReportPath(String path) { - LimaServiceConfig.getInstance().setProvisionalEntryBookEntryBookReportPath(path); + LimaServiceConfig.getInstance().setEntryBookEntryBookReportModelPath(path); } @Override public void setProvisionalEntryBookFinancialPeriodReportPath(String path) { - LimaServiceConfig.getInstance().setProvisionalEntryBookFinancialPeriodReportPath(path); + LimaServiceConfig.getInstance().setEntryBookFinancialPeriodReportModelPath(path); } @Override public void setProvisionalEntryBookTransactionReportPath(String path) { - LimaServiceConfig.getInstance().setProvisionalEntryBookTransactionReportPath(path); + LimaServiceConfig.getInstance().setEntryBookTransactionReportModelPath(path); } // @Override 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 5173f2c..a8cccf1 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 @@ -26,8 +26,8 @@ import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import org.apache.commons.lang3.StringUtils; import org.chorem.lima.beans.DocumentReport; -import org.chorem.lima.beans.BalanceReportAccount; -import org.chorem.lima.beans.BalanceReportAccountImpl; +import org.chorem.lima.beans.BalanceAccount; +import org.chorem.lima.beans.BalanceAccountImpl; import org.chorem.lima.beans.DocumentReportImpl; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.BalanceTrialImpl; @@ -78,10 +78,10 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal protected static final String TITLE = "BALANCE"; - protected static final Predicate<BalanceReportAccount> HAS_NO_ENTRY = new Predicate<BalanceReportAccount>() { + protected static final Predicate<BalanceAccount> HAS_NO_ENTRY = new Predicate<BalanceAccount>() { @Override - public boolean apply(BalanceReportAccount subClasses) { + public boolean apply(BalanceAccount subClasses) { boolean result = BigDecimal.ZERO.equals(subClasses.getAmountDebit()) && BigDecimal.ZERO.equals(subClasses.getAmountCredit()) && BigDecimal.ZERO.equals(subClasses.getSoldeDebit()) && @@ -92,21 +92,21 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String currency, DecimalFormat bigDecimalFormat) { - String BALANCE_REPORT_ACCOUNT_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceReportAccountReportPath(); - String BALANCE_SUB_ACCOUNTS_REPORT_PATH = LimaServiceConfig.getInstance().getBalanceSubAccountReportPath(); + String balanceAccountReportModelPath = LimaServiceConfig.getInstance().getBalanceAccountReportModelPath(); + String balanceSubAccountReportModelPath = LimaServiceConfig.getInstance().getBalanceSubAccountReportModelPath(); - DocumentReport result = new DocumentReportImpl(); - result.setFormatter(bigDecimalFormat); + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setFormatter(bigDecimalFormat); Identity identity = identityService.getIdentity(); - result.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + documentReport.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); // general info about balance report - result.setTitle(TITLE); - result.setCurrency(currency); - result.setFromDate(from); - result.setToDate(to); - result.setSubReportPath(BALANCE_REPORT_ACCOUNT_REPORT_PATH); + documentReport.setTitle(TITLE); + documentReport.setCurrency(currency); + documentReport.setFromDate(from); + documentReport.setToDate(to); + documentReport.setSubReportPath(balanceAccountReportModelPath); BalanceTrial balanceTrial = new BalanceTrialImpl(); @@ -129,7 +129,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accounts = accountService.stringToListAccounts(selectedAccounts); } - Collection<BalanceReportAccount> returnedAccounts = new ArrayList<>(); + Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); if (accounts != null && !accounts.isEmpty()) { Collections.sort(accounts, new AccountComparator()); @@ -137,31 +137,30 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal Account toAccount = accounts.get(accounts.size()-1); String fromAccountLabel = StringUtils.isNotBlank(fromAccount.getLabel()) ? fromAccount.getLabel() + " (" + fromAccount.getAccountNumber() + ")" : fromAccount.getAccountNumber(); String toAccountLabel = StringUtils.isNotBlank(toAccount.getLabel()) ? toAccount.getLabel() + " (" + toAccount.getAccountNumber() + ")" : toAccount.getAccountNumber(); - result.setFromAccount(fromAccountLabel + " à " + toAccountLabel); + documentReport.setFromAccount(fromAccountLabel + " à " + toAccountLabel); - HashMap<String, BalanceReportAccountImpl> accountsByClasses = new HashMap<>(); + HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - BalanceReportAccountImpl classAccount = accountsByClasses.get(accountClass); + BalanceAccountImpl classAccount = accountsByClasses.get(accountClass); if (classAccount == null) { - classAccount = new BalanceReportAccountImpl(); + classAccount = new BalanceAccountImpl(); classAccount.setFormatter(bigDecimalFormat); - classAccount.setBalanceSubAccountsReportPath(BALANCE_SUB_ACCOUNTS_REPORT_PATH); - classAccount.setSubAccounts(new ArrayList<BalanceReportAccount>()); + classAccount.setBalanceSubAccountsReportPath(balanceSubAccountReportModelPath); + classAccount.setSubAccounts(new ArrayList<BalanceAccount>()); classAccount.setAccountNumber(""); - classAccount.setLabel("Total " + accountClass); accountsByClasses.put(accountClass, classAccount); returnedAccounts.add(classAccount); } - BalanceReportAccount subClassAccount = bindAccountToBalanceReportAccount(account, from, to, bigDecimalFormat); + BalanceAccount subClassAccount = bindAccountToBalanceReportAccount(accountClass, account, from, to, bigDecimalFormat); classAccount.addSubAccount(subClassAccount); } } Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); - result.addAllAccounts(returnedAccounts); - return result; + documentReport.addAllMainAccounts(returnedAccounts); + return documentReport; } /** @@ -170,14 +169,15 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal * Get all entries if true * @throws org.nuiton.topia.persistence.TopiaException */ - protected BalanceReportAccount bindAccountToBalanceReportAccount(Account account, Date beginDate, Date endDate, DecimalFormat bigDecimalFormat) { - BalanceReportAccount balanceReportAccount = new BalanceReportAccountImpl(); - balanceReportAccount.setFormatter(bigDecimalFormat); + protected BalanceAccount bindAccountToBalanceReportAccount(String mainAccountLabel, Account account, Date beginDate, Date endDate, DecimalFormat bigDecimalFormat) { + BalanceAccount BalanceAccount = new BalanceAccountImpl(); + BalanceAccount.setMainAccountLabel(mainAccountLabel); + BalanceAccount.setFormatter(bigDecimalFormat); String accountNumber = account.getAccountNumber(); accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); - balanceReportAccount.setAccountNumber(accountNumber); - balanceReportAccount.setLabel(account.getLabel()); + BalanceAccount.setAccountNumber(accountNumber); + BalanceAccount.setLabel(account.getLabel()); EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); @@ -206,16 +206,16 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal sold = sold.subtract(credit); if (sold.compareTo(BigDecimal.ZERO) == 1) { - balanceReportAccount.setSoldeDebit(sold.abs()); - balanceReportAccount.setSoldeCredit(BigDecimal.ZERO); + BalanceAccount.setSoldeDebit(sold.abs()); + BalanceAccount.setSoldeCredit(BigDecimal.ZERO); } else { - balanceReportAccount.setSoldeCredit(sold.abs()); - balanceReportAccount.setSoldeDebit(BigDecimal.ZERO); + BalanceAccount.setSoldeCredit(sold.abs()); + BalanceAccount.setSoldeDebit(BigDecimal.ZERO); } - balanceReportAccount.setAmountCredit(credit); - balanceReportAccount.setAmountDebit(debit); + BalanceAccount.setAmountCredit(credit); + BalanceAccount.setAmountDebit(debit); - return balanceReportAccount; + return BalanceAccount; } } 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 70fef04..0d0cd36 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 @@ -10,10 +10,10 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.DocumentReportImpl; -import org.chorem.lima.beans.EntryBookPeriodReport; -import org.chorem.lima.beans.EntryBookPeriodReportImpl; +import org.chorem.lima.beans.GeneralEntryBook; import org.chorem.lima.beans.GeneralEntryBookEntry; import org.chorem.lima.beans.GeneralEntryBookEntryImpl; +import org.chorem.lima.beans.GeneralEntryBookImpl; import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.ClosedPeriodicEntryBookService; import org.chorem.lima.business.api.EntryService; @@ -73,24 +73,24 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple protected static final String TITLE = "Journal Général Provisoire"; @Override - public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat bigDecimalFormat) { - String entryBookPeriodReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryBookPeriodReportPath(); - String generalEntryBookEntryBookReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookGeneralEntryBookEntryReportPath(); + public DocumentReport getGeneralEntryBookDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat bigDecimalFormat) { + String generalEntryBookReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookReportModelPath(); + String generalEntryBookEntryReportPath = LimaServiceConfig.getInstance().getGeneralEntryBookEntryReportModelPath(); - DocumentReport result = new DocumentReportImpl(); + DocumentReport documentReport = new DocumentReportImpl(); try { if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); - result.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + documentReport.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); // general infos about balance report - result.setTitle(TITLE); - result.setCurrency(currency); - result.setFromDate(beginDate); - result.setToDate(endDate); - result.setSubReportPath(entryBookPeriodReportPath); - result.setFormatter(bigDecimalFormat); + documentReport.setTitle(TITLE); + documentReport.setCurrency(currency); + documentReport.setFromDate(beginDate); + documentReport.setToDate(endDate); + documentReport.setSubReportPath(generalEntryBookReportPath); + documentReport.setFormatter(bigDecimalFormat); List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(beginDate, endDate); @@ -161,14 +161,14 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple Iterables.removeIf(generalEntryBookEntries, HAS_NO_ENTRY); if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { - EntryBookPeriodReport entryBookPeriodReport = new EntryBookPeriodReportImpl(); - entryBookPeriodReport.setFormatter(bigDecimalFormat); - entryBookPeriodReport.setPeriod(financialPeriod.getBeginDate()); - entryBookPeriodReport.setSubReportPath(generalEntryBookEntryBookReportPath); - entryBookPeriodReport.setSoldeDebit(subAmountDebit); - entryBookPeriodReport.setSoldeCredit(subAmountCredit); - entryBookPeriodReport.setGeneralEntryBookEntry(Lists.newArrayList(generalEntryBookEntries)); - result.addEntryBookPeriodReport(entryBookPeriodReport); + GeneralEntryBook generalEntryBook = new GeneralEntryBookImpl(); + generalEntryBook.setFormatter(bigDecimalFormat); + generalEntryBook.setPeriod(financialPeriod.getBeginDate()); + generalEntryBook.setSubReportPath(generalEntryBookEntryReportPath); + generalEntryBook.setSoldeDebit(subAmountDebit); + generalEntryBook.setSoldeCredit(subAmountCredit); + generalEntryBook.setEntries(Lists.newArrayList(generalEntryBookEntries)); + documentReport.addGeneralEntryBooks(generalEntryBook); amountCredit = amountCredit.add(subAmountCredit); amountDebit = amountDebit.add(subAmountDebit); @@ -176,13 +176,13 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple } - result.setSoldeDebit(amountDebit); - result.setSoldeCredit(amountCredit); + documentReport.setSoldeDebit(amountDebit); + documentReport.setSoldeCredit(amountCredit); } } catch (Exception ex) { log.error("Can't create document", ex); throw new LimaTechnicalException("Can't create document", ex); } - return result; + return documentReport; } } 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 cf97ecb..425bbe9 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 @@ -18,6 +18,7 @@ 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.Collections; import java.util.Date; @@ -37,7 +38,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg protected ReportService reportService; @Override - public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency) { + public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat decimalFormat) { return null; // List<Object> list = new ArrayList<Object>(); // 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 5f78586..d21faa1 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 @@ -7,10 +7,8 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.DocumentReportImpl; -import org.chorem.lima.beans.EntryBookReport; -import org.chorem.lima.beans.EntryBookReportImpl; -import org.chorem.lima.beans.FinancialPeriodReport; -import org.chorem.lima.beans.FinancialPeriodReportImpl; +import org.chorem.lima.beans.EntryBookImpl; +import org.chorem.lima.beans.FinancialPeriodImpl; import org.chorem.lima.beans.Transaction; import org.chorem.lima.beans.TransactionImpl; import org.chorem.lima.business.LimaServiceConfig; @@ -68,12 +66,12 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo * - BIG_DECIMAL_FORMAT **/ @Override - public DocumentReport getProvisionalEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat) { + public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, String currency, DecimalFormat bigDecimalFormat) { LimaServiceConfig config = LimaServiceConfig.getInstance(); - String entryBookReportPath = config.getProvisionalEntryBookEntryBookReportPath(); - String financialPeriodReportPath = config.getProvisionalEntryBookFinancialPeriodReportPath(); - String transactionReportPath = config.getProvisionalEntryBookTransactionReportPath(); + String entryBookReportPath = config.getEntryBookEntryBookReportModelPath(); + String financialPeriodReportPath = config.getEntryBookFinancialPeriodReportModelPath(); + String transactionReportPath = config.getEntryBookTransactionReportModelPath(); DocumentReport documentReport = new DocumentReportImpl(); try { @@ -109,7 +107,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for(EntryBook entryBook:entryBooks) { - EntryBookReport entryBookReport = new EntryBookReportImpl(); + org.chorem.lima.beans.EntryBook entryBookReport = new EntryBookImpl(); entryBookReport.setLibelle(entryBook.getLabel()); entryBookReport.setCode(entryBook.getCode()); entryBookReport.setSubReportPath(financialPeriodReportPath); @@ -120,7 +118,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo // for each FinancialPeriod an EntryBookPeriodReport is created for (FinancialPeriod financialPeriod : financialPeriods) { - FinancialPeriodReport financialPeriodReport = new FinancialPeriodReportImpl(); + org.chorem.lima.beans.FinancialPeriod financialPeriodReport = new FinancialPeriodImpl(); financialPeriodReport.setSubReportPath(transactionReportPath); financialPeriodReport.setPeriod(financialPeriod.getBeginDate()); @@ -151,7 +149,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo financialPeriodDebit = financialPeriodDebit.add(debit); financialPeriodCredit = financialPeriodCredit.add(credit); - financialPeriodReport.addTransaction(transaction); + financialPeriodReport.addTransactions(transaction); } } @@ -161,7 +159,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo financialPeriodReport.setCredit(financialPeriodCredit); financialPeriodReport.setEntryBookCode(entryBook.getCode()); - entryBookReport.addFinancialPeriodReport(financialPeriodReport); + entryBookReport.addFinancialPeriods(financialPeriodReport); entryBookSoldeDebit = entryBookSoldeDebit.add(financialPeriodDebit); entryBookSoldeCredit = entryBookSoldeCredit.add(financialPeriodCredit); @@ -173,7 +171,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo if (entryBookSoldeDebit.compareTo(BigDecimal.ZERO) != 0 || entryBookSoldeCredit.compareTo(BigDecimal.ZERO) != 0) { entryBookReport.setSoldeDebit(entryBookSoldeDebit); entryBookReport.setSoldeCredit(entryBookSoldeCredit); - documentReport.addEntryBookReport(entryBookReport); + documentReport.addEntryBooks(entryBookReport); documentReportDebit = documentReportDebit.add(entryBookSoldeDebit); documentReportCredit = documentReportCredit.add(entryBookSoldeCredit); } diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index aa2b1b3..5f2474e 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -1,4 +1,5 @@ application.version= +blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-Business.defaultaccountingrules.updateentryerror=Can't update entry \: financialperiod of this entrybook is closed lima-Business.defaultaccountingrules.updatefinancialtransactionnewperioderror=Can't update financialtransaction \: this financialperiod of new entrybook is closed lima-Business.defaultaccountingrules.updatefinancialtransactionperioderror=Can't update financialtransaction \: the new financialperiod of this entrybook is closed @@ -126,7 +127,16 @@ lima-business.import.vatstatementalnomaster=FAILED \: The vatStatement %s has ma lima-business.import.vatstatementalreadyexist=FAILED \: The vatStatement %s already exists \!\n lima.config.configFileName.description=Filename of Lima's configuration lima.config.data.dir.description=Data directory of Lima -lima.config.documentReport.balanceReportAccount.description= +lima.config.documentReport.account.documentReportModelPath.description= +lima.config.documentReport.balance.balanceAccountReportModelPath.description= +lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= +lima.config.documentReport.balance.documentReportModelPath.description= +lima.config.documentReport.entrybook.documentReportModelPath.description= +lima.config.documentReport.entrybook.entryBookModelPath.description= +lima.config.documentReport.entrybook.financialPeriodModelPath.description= +lima.config.documentReport.entrybook.transactionReportModelPath.description= +lima.config.documentReport.generalEntrybook.documentReportModelPath.description= +lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index e708dfe..8a3a976 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -1,4 +1,5 @@ application.version= +blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-Business.defaultaccountingrules.updateentryerror=Impossible de mettre à jour l'entrée \: la période financière de ce journal est bloquée lima-Business.defaultaccountingrules.updatefinancialtransactionnewperioderror=Impossible de mettre à jour la transaction \: la période financière de ce nouveau journal est bloquée lima-Business.defaultaccountingrules.updatefinancialtransactionperioderror=Impossible de mettre à jour la transaction \: la période financière de ce journal est bloquée @@ -121,12 +122,23 @@ lima-business.import.vatstatementalnomaster=u00C9chec \: Le plan %s possède le lima-business.import.vatstatementalreadyexist=u00C9chec \: Le plan %s exist déjà \!\n lima.config.configFileName.description=Nom du fichier de configuration de Lima lima.config.data.dir.description=Répertoire des données de Lima -lima.config.documentReport.balanceReportAccount.description= +lima.config.documentReport.account.accountModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'account' +lima.config.documentReport.account.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.balance.balanceAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' +lima.config.documentReport.balance.balanceSubAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' des comptes enfants +lima.config.documentReport.balance.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport lima.config.documentReport.bigDecimalFormat=formattage des montants -lima.config.documentReport.entryBookReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBookReport' -lima.config.documentReport.financialPeriodPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'FinancialPeriodReport' -lima.config.documentReport.generalEntryBookReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' -lima.config.documentReport.transactionReportPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'Transaction' +lima.config.documentReport.entrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' +lima.config.documentReport.entrybook.entryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' +lima.config.documentReport.entrybook.financialPeriodModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'FinancialPeriod' +lima.config.documentReport.entrybook.transactionReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'Transaction' +lima.config.documentReport.financialStatement.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.financialStatement.financialStatementModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'financialStatement' +lima.config.documentReport.generalEntrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBookEntry' +lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' +lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.httpport.description=Port HTTP lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport diff --git a/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java index 2350d54..db4f3e0 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java @@ -35,6 +35,7 @@ import org.junit.Before; import org.junit.Test; import java.text.ParseException; +import java.util.List; /** * Tests pour la gestion des journaux. @@ -60,15 +61,15 @@ public class EntryBookServiceImplTest extends AbstractLimaTest { */ @Test public void modifyJournalTest() throws LimaException { - - EntryBook entryBook = entryBookService.getAllEntryBooks().get(0); + List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); + EntryBook entryBook = entryBookService.getEntryBookByCode("jdv"); Assert.assertNotNull(entryBook); Assert.assertEquals(JOURNAL_DES_VENTES, entryBook.getLabel()); entryBook.setLabel("Journal des achats"); entryBookService.updateEntryBook(entryBook); // Recherche du journal dans la bdd - entryBook = entryBookService.getAllEntryBooks().get(0); + entryBook = entryBookService.getEntryBookByCode("jdv"); Assert.assertNotNull(entryBook); Assert.assertEquals("Journal des achats", entryBook.getLabel()); } @@ -80,7 +81,7 @@ public class EntryBookServiceImplTest extends AbstractLimaTest { */ @Test(expected=UsedEntryBookException.class) public void deleteUsedEntryBook() throws LimaException, ParseException { - EntryBook entryBook = entryBookService.getAllEntryBooks().get(0); // VTE + EntryBook entryBook = entryBookService.getEntryBookByCode("jdv"); Assert.assertNotNull(entryBook); // make transaction used diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java similarity index 93% rename from lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java rename to lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java index fbb88db..4b1070b 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java @@ -25,11 +25,11 @@ package org.chorem.lima.beans; import java.math.BigDecimal; -public class BalanceReportAccountImpl extends BalanceReportAccount { +public class BalanceAccountImpl extends BalanceAccount { private static final long serialVersionUID = 1L; - public void addSubAccount(BalanceReportAccount subAccount) { + public void addSubAccount(BalanceAccount subAccount) { // we only add account that have values if (subAccount.getAmountDebit() != null && subAccount.getAmountCredit() != null) { diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index bdf1867..ca852d6 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java index e74b66c..84710a2 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java @@ -205,19 +205,19 @@ public class LimaMain { LimaServiceConfig serviceConfig = LimaServiceConfig.getInstance(); LimaSwingConfig swingConfig = LimaSwingConfig.getInstance(); - serviceConfig.setBalanceReportPath(swingConfig.getBalanceReportPath()); - serviceConfig.setReportsDir(swingConfig.getReportsDir().getAbsolutePath()); - serviceConfig.setAccountReportPath(swingConfig.getAccountReportPath()); - serviceConfig.setBalanceReportPath(swingConfig.getBalanceReportPath()); - serviceConfig.setBalanceReportAccountReportPath(swingConfig.getBalanceReportAccountReportPath()); - serviceConfig.setBalanceSubAccountReportPath(swingConfig.getBalanceSubAccountReportPath()); - serviceConfig.setGeneralEntryBookEntryBookMainReportPath(swingConfig.getGeneralEntryBookEntryBookMainReportPath()); - serviceConfig.setGeneralEntryBookGeneralEntryBookEntryReportPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); - serviceConfig.setGeneralEntryBookGeneralEntryBookEntryReportPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); - serviceConfig.setProvisionalEntryBookEntryBookMainReportPath(swingConfig.getProvisionalEntryBookEntryBookMainReportPath()); - serviceConfig.setProvisionalEntryBookEntryBookReportPath(swingConfig.getProvisionalEntryBookEntryBookReportPath()); - serviceConfig.setProvisionalEntryBookFinancialPeriodReportPath(swingConfig.getProvisionalEntryBookFinancialPeriodReportPath()); - serviceConfig.setProvisionalEntryBookTransactionReportPath(swingConfig.getProvisionalEntryBookTransactionReportPath()); + serviceConfig.setBalanceDocumentReportModelPath(swingConfig.getBalanceDocumentReportModelPath()); + serviceConfig.setReportsModelDir(swingConfig.getReportsDir().getAbsolutePath()); + serviceConfig.setAccountReportModelPath(swingConfig.getAccountDocumentReportModelPath()); + serviceConfig.setBalanceDocumentReportModelPath(swingConfig.getBalanceDocumentReportModelPath()); + serviceConfig.setBalanceAccountReportModelPath(swingConfig.getBalanceAccountReportModelPath()); + serviceConfig.setBalanceSubAccountReportModelPath(swingConfig.getBalanceSubAccountReportModelPath()); + serviceConfig.setGeneralEntryBookDocumentReportModelPath(swingConfig.getGeneralEntryBookDocumentReportModelPath()); + serviceConfig.setGeneralEntryBookEntryReportModelPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); + serviceConfig.setGeneralEntryBookEntryReportModelPath(swingConfig.getGeneralEntryBookGeneralEntryBookEntryReportPath()); + serviceConfig.setEntryBookDocumentReportModelPath(swingConfig.getProvisionalEntryBookEntryBookMainReportPath()); + serviceConfig.setEntryBookEntryBookReportModelPath(swingConfig.getProvisionalEntryBookEntryBookReportPath()); + serviceConfig.setEntryBookFinancialPeriodReportModelPath(swingConfig.getProvisionalEntryBookFinancialPeriodReportPath()); + serviceConfig.setEntryBookTransactionReportModelPath(swingConfig.getProvisionalEntryBookTransactionReportPath()); httpServerService = new HttpServerService(); diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java index 59a72f4..143e4cd 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java @@ -368,58 +368,58 @@ public class LimaSwingConfig extends ApplicationConfig { } // reports - public String getAccountReportPath() { - String result = getOption(Option.ACCOUNT_REPORT_PATH.key); + public String getAccountDocumentReportModelPath() { + String result = getOption(Option.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.key); return result; } - public String getBalanceReportPath() { - String result = getOption(Option.BALANCE_REPORT_PATH.key); + public String getBalanceDocumentReportModelPath() { + String result = getOption(Option.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key); return result; } - public String getBalanceReportAccountReportPath() { - String result = getOption(Option.BALANCE_REPORT_ACCOUNT_REPORT_PATH.key); + public String getBalanceAccountReportModelPath() { + String result = getOption(Option.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key); return result; } - public String getBalanceSubAccountReportPath() { - String result = getOption(Option.BALANCE_SUB_ACCOUNT_REPORT_PATH.key); + public String getBalanceSubAccountReportModelPath() { + String result = getOption(Option.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key); return result; } - public String getGeneralEntryBookEntryBookMainReportPath() { - String result = getOption(Option.GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.key); + public String getGeneralEntryBookDocumentReportModelPath() { + String result = getOption(Option.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); return result; } - public String getGeneralEntryBookEntryBookPeriodReportPath() { - String result = getOption(Option.GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH.key); + public String getGeneralEntryBookReportModelPath() { + String result = getOption(Option.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key); return result; } public String getGeneralEntryBookGeneralEntryBookEntryReportPath() { - String result = getOption(Option.GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH.key); + String result = getOption(Option.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key); return result; } public String getProvisionalEntryBookEntryBookMainReportPath() { - String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH.getKey()); + String result = getOption(Option.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.getKey()); return result; } public String getProvisionalEntryBookEntryBookReportPath() { - String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH.getKey()); + String result = getOption(Option.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.getKey()); return result; } public String getProvisionalEntryBookFinancialPeriodReportPath() { - String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH.getKey()); + String result = getOption(Option.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.getKey()); return result; } public String getProvisionalEntryBookTransactionReportPath() { - String result = getOption(Option.PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH.getKey()); + String result = getOption(Option.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.getKey()); return result; } @@ -699,70 +699,71 @@ public class LimaSwingConfig extends ApplicationConfig { "${lima.data.dir}/reports", File.class, false, false), - ACCOUNT_REPORT_PATH("lima.accounts.accountReportPath", + ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", "", - "", - ROOT_PATH + "/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml", + n("lima.config.documentReport.account.documentReportModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/accounts/DocumentReport.jrxml", String.class, false, false), - BALANCE_REPORT_PATH("lima.balance.balanceReportPath", - "", + BALANCE_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.balance.documentReportModelPath", "", - ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml", + n("lima.config.documentReport.balance.documentReportModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/balance/DocumentReport.jrxml", String.class, false, false), - BALANCE_REPORT_ACCOUNT_REPORT_PATH("lima.balance.balanceReportAccountReportPath", - "", + BALANCE_ACCOUNT_REPORT_MODEL_PATH("lima.config.documentReport.balance.balanceAccountReportModelPath", "", + n("lima.config.documentReport.balance.balanceAccountReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml", String.class, false, false), - BALANCE_SUB_ACCOUNT_REPORT_PATH("lima.balance.balanceSubAccountReportPath", + BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH("lima.config.documentReport.balance.balanceSubAccountReportModelPath", "", - n("lima.config.documentReport.balanceReportAccount.description"), + n("lima.config.documentReport.balance.balanceSubAccountReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml", String.class, false, false), - GENERAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.generalEntryBook.entryBookMainReportPath", + GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.documentReportModelPath", "", - "", - ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml", + n("lima.config.documentReport.generalEntrybook.documentReportModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/DocumentReport.jrxml", String.class, false, false), - GENERAL_ENTRY_BOOK_ENTRY_BOOK_PERIOD_REPORT_PATH("lima.generalEntryBook.entryBookPeriodReportPath", - "", + GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.generalEntryBookModelPath", "", + n("lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml", String.class, false, false), - GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOK_ENTRY_REPORT_PATH("lima.generalEntryBook.generalEntryBookEntryReportPath", - "", + GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH("lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath", "", + n("blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml", String.class, false, false), - PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_MAIN_REPORT_PATH("lima.provisionalEntryBook.entryBookMainReportPath", + ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.documentReportModelPath", "", - "", - ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml", + n("lima.config.documentReport.entrybook.documentReportModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/DocumentReport.jrxml", String.class,false, false), - PROVISIONAL_ENTRY_BOOK_ENTRY_BOOK_REPORT_PATH("lima.provisionalEntryBook.entryBookReport", - "", + + ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.entryBookModelPath", "", - ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml", + n("lima.config.documentReport.entrybook.entryBookModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/EntryBookReport.jrxml", String.class,false, false), - PROVISIONAL_ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_PATH("lima.provisionalEntryBook.financialPeriodReportPath", + ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.financialPeriodModelPath", "", - "", - ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml", + n("lima.config.documentReport.entrybook.financialPeriodModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml", String.class, false, false), - PROVISIONAL_ENTRY_BOOK_TRANSACTION_REPORT_PATH("lima.provisionalEntryBook.transactionReportPath", - "", + ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.transactionReportModelPath", "", - ROOT_PATH + "/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml", + n("lima.config.documentReport.entrybook.transactionReportModelPath.description"), + ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml", String.class, false, false); protected enum ComportmentEditingCellEnum {ALL, NOTHING} diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 7fd97de..0531cee 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -1,3 +1,4 @@ +blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.account= lima.account.add= lima.account.add.error.InvalidAccountNumber= @@ -90,9 +91,19 @@ lima.config.data.dir.description= lima.config.data.dir.label= lima.config.decimalSeparator.description= lima.config.decimalSeparator.label= +lima.config.documentReport.account.documentReportModelPath.description= +lima.config.documentReport.balance.balanceAccountReportModelPath.description= +lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= +lima.config.documentReport.balance.documentReportModelPath.description= lima.config.documentReport.balanceReportAccount.description= lima.config.documentReport.bigDecimalFormat.description= lima.config.documentReport.bigDecimalFormat.label= +lima.config.documentReport.entrybook.documentReportModelPath.description= +lima.config.documentReport.entrybook.entryBookModelPath.description= +lima.config.documentReport.entrybook.financialPeriodModelPath.description= +lima.config.documentReport.entrybook.transactionReportModelPath.description= +lima.config.documentReport.generalEntrybook.documentReportModelPath.description= +lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= lima.config.host.address.description= lima.config.host.address.label= lima.config.i18n.dir.description= diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index c09f545..6ede2c9 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -1,3 +1,4 @@ +blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.account=Compte lima.account.add=Nouveau compte (Ctrl+A) lima.account.add.error.InvalidAccountNumber=Le numéro du compt %1$s n'est pas valide @@ -89,9 +90,25 @@ lima.config.data.dir.description=Répertoire d'enregistrement des données de l' lima.config.data.dir.label=Répertoire des données lima.config.decimalSeparator.description=Caractères de séparation entre la partie entière et la parti décimale d'un nombre lima.config.decimalSeparator.label=Séparateur de décimales +lima.config.documentReport.account.accountModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'account' +lima.config.documentReport.account.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.balance.balanceAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' +lima.config.documentReport.balance.balanceSubAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' des comptes enfants +lima.config.documentReport.balance.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport lima.config.documentReport.balanceReportAccount.description= lima.config.documentReport.bigDecimalFormat.description=format pour affichage des montants dans les rapports lima.config.documentReport.bigDecimalFormat.label=format pour affichage des montants +lima.config.documentReport.entrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' +lima.config.documentReport.entrybook.entryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' +lima.config.documentReport.entrybook.financialPeriodModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'FinancialPeriod' +lima.config.documentReport.entrybook.transactionReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'Transaction' +lima.config.documentReport.financialStatement.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.financialStatement.financialStatementModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'financialStatement' +lima.config.documentReport.generalEntrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBookEntry' +lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' +lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' +lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.host.address.description=Adresse du serveur distant lima.config.host.address.label=Serveur lima.config.i18n.dir.description=Dossier contenant les traduction de lima diff --git a/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml b/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml deleted file mode 100644 index 014e820..0000000 --- a/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> -<!-- 2014-10-02T11:45:07 --> -<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="AccountReportC" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="988d60dc-e878-4a6d-8789-7dffd9f27769"> - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="AccountBeanAdaptor2"/> - <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"/> - <property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/> - <style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/> - <style name="SubTitle" forecolor="#736343" fontName="Times New Roman" pdfFontName="Times-Roman" fontSize="18"/> - <style name="Column header" forecolor="#666666" fontName="Times New Roman" pdfFontName="Times-Roman" fontSize="12" isBold="true"/> - <style name="Detail" backcolor="#CCFFCC" fontName="Times New Roman" fontSize="12" pdfFontName="Times-Roman"/> - <style name="Row" mode="Transparent"> - <conditionalStyle> - <conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression> - <style backcolor="#E6DAC3"/> - </conditionalStyle> - </style> - <queryString language="SQL"> - <![CDATA[]]> - </queryString> - <field name="accountNumber" class="java.lang.String"/> - <field name="label" class="java.lang.String"/> - <group name="Group1"> - <groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression> - </group> - <group name="Group2"> - <groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression> - </group> - <background> - <band splitType="Stretch"/> - </background> - <title> - <band height="50" splitType="Stretch"> - <staticText> - <reportElement style="Title" x="170" y="0" width="263" height="30" uuid="f4b151ca-f4bb-45fa-8fa7-416c74bda6ed"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font fontName="Times New Roman" size="14" pdfFontName="Times-Roman"/> - </textElement> - <text><![CDATA[Liste des Comptes]]></text> - </staticText> - <textField pattern="EEEEE dd MMMMM yyyy"> - <reportElement style="Column header" x="450" y="10" width="115" height="20" forecolor="#736343" uuid="6e0a2e2e-bfe6-4208-b2b8-a2ee0fd23bc3"/> - <textElement verticalAlignment="Middle"> - <font size="10" isBold="false"/> - </textElement> - <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> - </textField> - </band> - </title> - <pageHeader> - <band splitType="Stretch"/> - </pageHeader> - <columnHeader> - <band height="20" splitType="Stretch"> - <frame> - <reportElement mode="Opaque" x="100" y="0" width="100" height="20" forecolor="#B89F7D" backcolor="#F2EBDF" uuid="cfea52a4-a7c7-4222-96c0-3ff78a050aa4"/> - <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> - <staticText> - <reportElement x="0" y="0" width="100" height="20" uuid="0768a37f-c1c8-4247-9546-9ea7c6117ed9"/> - <box> - <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - </box> - <text><![CDATA[label]]></text> - </staticText> - </frame> - <frame> - <reportElement mode="Opaque" x="0" y="0" width="99" height="20" forecolor="#B89F7D" backcolor="#F2EBDF" uuid="13e75fe2-71fa-484b-9a2c-cd7a178deb17"/> - <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> - <staticText> - <reportElement x="0" y="0" width="99" height="20" uuid="cdbebdf6-fb7e-40a1-b5a3-00ac9d5389ef"/> - <box> - <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> - </box> - <text><![CDATA[Compte]]></text> - </staticText> - </frame> - </band> - </columnHeader> - <detail> - <band height="20" splitType="Stretch"> - <textField> - <reportElement x="0" y="0" width="100" height="20" uuid="c940221c-a753-4c62-a407-465456d450b6"/> - <box> - <topPen lineWidth="0.5"/> - <leftPen lineWidth="0.5"/> - <bottomPen lineWidth="0.5"/> - <rightPen lineWidth="0.5"/> - </box> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="100" y="0" width="100" height="20" uuid="2a034b82-680f-47b7-b951-f11dd97ffabf"/> - <box> - <topPen lineWidth="0.5"/> - <leftPen lineWidth="0.5"/> - <bottomPen lineWidth="0.5"/> - <rightPen lineWidth="0.5"/> - </box> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - </band> - </detail> - <columnFooter> - <band height="45" splitType="Stretch"/> - </columnFooter> - <pageFooter> - <band height="25" splitType="Stretch"> - <frame> - <reportElement mode="Opaque" x="-21" y="1" width="597" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="b5834407-22ff-4e5d-a7f8-3b5be0962706"/> - <textField evaluationTime="Report"> - <reportElement style="Column header" x="533" y="0" width="40" height="20" forecolor="#736343" uuid="df3c3050-1890-4a3b-a4b4-1e8f28016a1c"/> - <textElement verticalAlignment="Middle"> - <font size="10" isBold="false"/> - </textElement> - <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> - </textField> - <textField> - <reportElement style="Column header" x="453" y="0" width="80" height="20" forecolor="#736343" uuid="3d887e8a-f0d7-4d38-8553-dbf76dd04d36"/> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="10" isBold="false"/> - </textElement> - <textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> - </textField> - <textField pattern="EEEEE dd MMMMM yyyy"> - <reportElement style="Column header" x="22" y="1" width="197" height="20" forecolor="#736343" uuid="1cc9564c-479d-46b3-a4bf-9221ae6d4f01"/> - <textElement verticalAlignment="Middle"> - <font size="10" isBold="false"/> - </textElement> - <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> - </textField> - </frame> - </band> - </pageFooter> - <summary> - <band splitType="Stretch"/> - </summary> -</jasperReport> diff --git a/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml index 9cb3b94..2a56b5d 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:01:44 --> +<!-- 2015-01-21T13:44:15 --> <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="21" 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"/> @@ -30,94 +30,6 @@ <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> </subreport> </band> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[new Boolean($F{amountDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountDebit}) : ""]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[new Boolean($F{amountCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountCredit}) : ""]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[new Boolean($F{soldeDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeDebit}) : ""]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[new Boolean($F{soldeCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{soldeCredit}) : ""]]></textFieldExpression> - </textField> - </band> </detail> <columnFooter> <band height="1"> diff --git a/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml index b5df64e..a9a5bd5 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -1,18 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:15:11 --> -<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="10" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-21T14:33: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="BalanceClassesReport" pageWidth="578" pageHeight="20" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <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="Arial"/> <style name="Default oblique" fontName="Monospaced"/> <queryString> @@ -25,6 +17,23 @@ <field name="soldeDebit" class="java.math.BigDecimal"/> <field name="soldeCredit" class="java.math.BigDecimal"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="mainAccountLabel" class="java.lang.String"/> + <variable name="amountDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{amountDebit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="amountCreditSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{amountCredit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="soldeDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{soldeDebit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="soldeCreditSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{soldeCredit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> <detail> <band height="10" splitType="Stretch"> <textField isBlankWhenNull="true"> @@ -42,7 +51,7 @@ <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <reportElement stretchType="RelativeToTallestObject" x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> <property name="local_mesure_unity" value="pixel"/> </reportElement> <box> @@ -86,7 +95,9 @@ <textFieldExpression><![CDATA[new Boolean($F{amountCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{amountCredit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> + <property name="local_mesure_unitx" value="pixel"/> + </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> @@ -115,4 +126,258 @@ </textField> </band> </detail> + <columnFooter> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <printWhenExpression><![CDATA[($V{PAGE_NUMBER} +1) < $V{PAGE_COUNT}]]></printWhenExpression> + <frame> + <reportElement mode="Transparent" x="0" y="0" width="578" height="10" uuid="01691c82-c3b6-4b63-b6d5-3aba5eff6b27"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="290" height="10" forecolor="#736343" uuid="b656cbb0-02be-403d-8913-191b051fff78"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement> + <font size="8" isBold="true"/> + <paragraph leftIndent="80"/> + </textElement> + <textFieldExpression><![CDATA["Sous total pour" + $F{mainAccountLabel}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="9c59df76-21ef-428f-8266-0da4cade0a20"> + <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"/> + <printWhenExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="52091c73-538e-4f13-9e80-d8ceceb20925"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{soldeCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeCreditSolde}) : ""]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="7f9a6117-e3b4-492f-ba5a-b4f913516294"> + <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"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + <printWhenExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{amountDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="d149a582-98a8-4cce-ab19-c42f1142839c"> + <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"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{amountCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountCreditSolde}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </columnFooter> + <lastPageFooter> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement mode="Transparent" x="0" y="0" width="578" height="10" uuid="4b8bb146-d5ae-4d4f-af2f-638dfd75dd32"> + <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="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="290" height="10" forecolor="#736343" uuid="438ff8bf-de02-4ab6-8565-86f3e5deec4c"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement> + <font size="8" isBold="true"/> + <paragraph leftIndent="80"/> + </textElement> + <textFieldExpression><![CDATA["Total pour " + $F{mainAccountLabel}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="6edd1323-c09c-45f8-ac94-be4753616581"> + <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"/> + <printWhenExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="6bc7b25f-7a33-4243-8b41-c12fc69bfdd9"> + <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.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{soldeCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeCreditSolde}) : ""]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="true"> + <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="4b3cfcb7-e1c1-4825-824d-3f30c424cb8d"> + <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"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + <printWhenExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{amountDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountDebitSolde}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0736caf4-6f73-417e-93c8-2a81a81f6721"> + <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"/> + <property name="local_mesure_unity" value="pixel"/> + <property name="com.jaspersoft.studio.unit.y" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#736343"/> + </box> + <textElement textAlignment="Right"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{amountCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountCreditSolde}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-web/src/main/jasperreports/balance/DocumentReport.jrxml similarity index 97% copy from lima-web/src/main/jasperreports/balance/BalanceReport.jrxml copy to lima-web/src/main/jasperreports/balance/DocumentReport.jrxml index 2939f3c..05cdae3 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml +++ b/lima-web/src/main/jasperreports/balance/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:14:01 --> +<!-- 2015-01-21T10:08:30 --> <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"/> @@ -16,14 +16,14 @@ <field name="currency" class="java.lang.String"/> <field name="fromAccount" class="java.lang.String"/> <field name="toAccount" class="java.lang.String"/> - <field name="accounts" class="java.util.List"/> + <field name="mainAccounts" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="companyName" class="java.lang.String"/> <field name="title" class="java.lang.String"/> - <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 name="mainAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{mainAccounts})]]></variableExpression> </variable> - <group name="accounts"/> + <group name="mainAccounts"/> <background> <band splitType="Stretch"/> </background> @@ -246,7 +246,7 @@ <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> + <dataSourceExpression><![CDATA[$V{mainAccounts}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/entryBook/DocumentReport.jrxml similarity index 97% rename from lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml rename to lima-web/src/main/jasperreports/entryBook/DocumentReport.jrxml index e5320fe..3b01327 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:17:08 --> +<!-- 2015-01-21T10:16:58 --> <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"/> @@ -14,17 +14,17 @@ <field name="fromDate" class="java.util.Date"/> <field name="toDate" class="java.util.Date"/> <field name="currency" class="java.lang.String"/> - <field name="entryBookReport" class="java.util.List"/> + <field name="entryBooks" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <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="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBookReport})]]></variableExpression> + <variable name="entryBooks" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBooks})]]></variableExpression> </variable> - <group name="entryBookPeriodReport"/> + <group name="entryBooks"/> <background> <band splitType="Stretch"/> </background> @@ -240,7 +240,7 @@ <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{entryBookPeriodReport}]]></dataSourceExpression> + <dataSourceExpression><![CDATA[$V{entryBooks}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml b/lima-web/src/main/jasperreports/entryBook/EntryBookReport.jrxml similarity index 98% rename from lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml rename to lima-web/src/main/jasperreports/entryBook/EntryBookReport.jrxml index a83354f..67b9927 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/EntryBookReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/EntryBookReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:21:54 --> +<!-- 2015-01-21T10:20:12 --> <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="50" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -12,13 +12,13 @@ </queryString> <field name="soldeDebit" class="java.math.BigDecimal"/> <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="financialPeriodReport" class="java.util.List"/> + <field name="financialPeriods" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="code" class="java.lang.String"/> <field name="libelle" class="java.lang.String"/> <field name="formatter" class="java.text.DecimalFormat"/> <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{financialPeriodReport})]]></variableExpression> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{financialPeriods})]]></variableExpression> </variable> <pageHeader> <band height="10"> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml b/lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml similarity index 98% rename from lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml rename to lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml index cf9f593..b830692 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/FinancialPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:21:00 --> +<!-- 2015-01-21T10:20:48 --> <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="51" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" isFloatColumnFooter="true" whenResourceMissingType="Empty" isIgnoreP [...] <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -20,14 +20,14 @@ </queryString> <field name="soldeDebit" class="java.math.BigDecimal"/> <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="transaction" class="java.util.List"/> + <field name="transactions" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="period" class="java.util.Date"/> <field name="libelle" class="java.lang.String"/> <field name="entryBookCode" class="java.lang.String"/> <field name="formatter" class="java.text.DecimalFormat"/> <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{transaction})]]></variableExpression> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{transactions})]]></variableExpression> </variable> <pageHeader> <band height="10"> diff --git a/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml similarity index 99% rename from lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml rename to lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml index a609a8e..282875c 100644 --- a/lima-web/src/main/jasperreports/provisionalEntryBook/TransactionReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:24:25 --> +<!-- 2015-01-21T11:00:00 --> <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="30" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/DocumentReport.jrxml similarity index 97% rename from lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml rename to lima-web/src/main/jasperreports/generalEntryBook/DocumentReport.jrxml index 23c6cb0..35a28e7 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookMainReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T15:09:41 --> +<!-- 2015-01-21T10:06:37 --> <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"/> @@ -14,15 +14,15 @@ <field name="fromDate" class="java.util.Date"/> <field name="toDate" class="java.util.Date"/> <field name="currency" class="java.lang.String"/> - <field name="entryBookPeriodReport" class="java.util.List"/> + <field name="generalEntryBooks" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <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="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBookPeriodReport})]]></variableExpression> + <variable name="generalEntryBooks" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalEntryBooks})]]></variableExpression> </variable> <group name="entryBookPeriodReport"/> <background> @@ -197,7 +197,7 @@ <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{entryBookPeriodReport}]]></dataSourceExpression> + <dataSourceExpression><![CDATA[$V{generalEntryBooks}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index 03f40b2..343f89d 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T15:09:41 --> +<!-- 2015-01-21T10:22:40 --> <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="20" 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"/> @@ -20,12 +20,12 @@ </queryString> <field name="soldeDebit" class="java.math.BigDecimal"/> <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="generalEntryBookEntry" class="java.util.List"/> + <field name="entries" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="period" class="java.util.Date"/> <field name="formatter" class="java.text.DecimalFormat"/> - <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalEntryBookEntry})]]></variableExpression> + <variable name="entries" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entries})]]></variableExpression> </variable> <detail> <band height="10"> @@ -67,7 +67,7 @@ <band height="10" splitType="Stretch"> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> + <dataSourceExpression><![CDATA[$V{entries}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> diff --git a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml index 44b60d8..36a7553 100644 --- a/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml +++ b/lima-web/src/main/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T15:09:41 --> +<!-- 2015-01-21T10:22:40 --> <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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> diff --git a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml similarity index 77% rename from lima-web/src/main/jasperreports/balance/BalanceReport.jrxml rename to lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml index 2939f3c..aded66d 100644 --- a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml +++ b/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T14:14:01 --> +<!-- 2015-01-21T10:10:15 --> <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"/> @@ -14,16 +14,16 @@ <field name="fromDate" class="java.util.Date"/> <field name="toDate" class="java.util.Date"/> <field name="currency" class="java.lang.String"/> - <field name="fromAccount" class="java.lang.String"/> - <field name="toAccount" class="java.lang.String"/> - <field name="accounts" class="java.util.List"/> + <field name="generalLedgers" class="java.util.List"/> <field name="subReportPath" class="java.lang.String"/> <field name="companyName" class="java.lang.String"/> <field name="title" class="java.lang.String"/> - <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> + <field name="fromAccount" class="java.lang.String"/> + <field name="toAccount" class="java.lang.String"/> + <variable name="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalLedgers})]]></variableExpression> </variable> - <group name="accounts"/> + <group name="entryBookPeriodReport"/> <background> <band splitType="Stretch"/> </background> @@ -91,17 +91,6 @@ <pageHeader> <band height="25" splitType="Stretch"> <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> - </textField> - <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"/> @@ -111,6 +100,17 @@ </textElement> <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="02c35c41-1b1f-4554-ab87-5403d63ae3d6"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> + </textField> </band> </pageHeader> <columnHeader> @@ -126,118 +126,128 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <staticText> - <reportElement x="0" y="0" width="40" height="20" forecolor="#804000" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="60" 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" lineColor="#804000"/> + <rightPen lineWidth="0.6"/> </box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Compte]]></text> + <text><![CDATA[Date]]></text> </staticText> <staticText> - <reportElement x="40" y="0" width="250" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <reportElement x="60" y="0" width="40" 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" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> + <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[Intitulé]]></text> + <text><![CDATA[Journal]]></text> </staticText> <staticText> - <reportElement x="290" y="0" width="144" height="10" forecolor="#804000" uuid="caadc464-ad77-4b53-b5cb-11e29c0a18ce"> + <reportElement x="100" y="0" width="40" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> <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"/> + <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="#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"/> + <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[Total Période]]></text> + <text><![CDATA[Pièce]]></text> </staticText> <staticText> - <reportElement x="290" y="10" width="72" height="10" forecolor="#804000" uuid="e6928f86-fe5c-4c14-996c-19728e6abf44"> + <reportElement x="140" y="0" width="222" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> <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"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> </reportElement> <box> - <rightPen lineWidth="0.6" lineColor="#804000"/> + <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[Débit]]></text> + <text><![CDATA[Intitulé]]></text> </staticText> <staticText> - <reportElement x="362" y="10" width="72" height="10" forecolor="#804000" uuid="13dd0f7b-3331-4ca4-8ef8-5468fb65fc3e"> + <reportElement x="362" 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"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" 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[Crédit]]></text> - </staticText> - <staticText> - <reportElement x="434" y="0" width="144" height="10" 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[Solde Période]]></text> + <text><![CDATA[Débit]]></text> </staticText> <staticText> - <reportElement x="434" y="10" width="72" height="10" forecolor="#804000" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> + <reportElement x="434" 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"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> </reportElement> <box> - <topPen lineWidth="0.6" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineColor="#804000"/> + <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[Débit]]></text> + <text><![CDATA[Crédit]]></text> </staticText> <staticText> - <reportElement x="506" y="10" width="72" height="10" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> + <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"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" 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> + <text><![CDATA[Solde]]></text> </staticText> </frame> </band> @@ -246,7 +256,7 @@ <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> + <dataSourceExpression><![CDATA[$V{entryBookPeriodReport}]]></dataSourceExpression> <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></subreportExpression> </subreport> </band> diff --git a/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml b/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml new file mode 100644 index 0000000..370b349 --- /dev/null +++ b/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml @@ -0,0 +1,301 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2015-01-14T11:29:22 --> +<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="Arial"/> + <style name="Default oblique" fontName="Monospaced"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="date" class="java.util.Date"/> + <field name="entryBook" class="java.lang.String"/> + <field name="voucher" class="java.lang.String"/> + <field name="libelle" class="java.lang.String"/> + <field name="debit" class="java.math.BigDecimal"/> + <field name="credit" class="java.math.BigDecimal"/> + <field name="solde" class="java.math.BigDecimal"/> + <field name="period" class="java.lang.String"/> + <field name="accountNumber" class="java.lang.String"/> + <field name="accountLabel" class="java.lang.String"/> + <variable name="totalPeriodDebit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="totalPeriodCredit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="totalPeriodSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{solde}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="totalAccountDebit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="totalAccountCredit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="totalAccountSolde" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{solde}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="solde1" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variableExpression><![CDATA[$F{solde}]]></variableExpression> + </variable> + <pageHeader> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#D0B48E" backcolor="#FDCA97" uuid="644d4927-8973-45d7-bd80-0512dad33987"> + <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="60" height="10" uuid="be71eb35-fb58-473a-8ac1-07d658474372"> + <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> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="60" y="0" width="518" height="10" uuid="c2b6613a-5505-4f7b-8aba-79e247b3edc6"> + <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"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textFieldExpression><![CDATA[$F{accountLabel}]]></textFieldExpression> + </textField> + </frame> + </band> + </pageHeader> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="60" 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="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="60" y="0" width="40" 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="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{entryBook}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="100" y="0" width="40" 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="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="140" y="0" width="222" 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="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" 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="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" 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="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" 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> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{solde}]]></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="362" y="0" width="72" height="10" forecolor="#D0B48E" 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> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{totalPeriodDebit}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="434" y="0" width="72" height="10" forecolor="#D0B48E" 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> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{totalPeriodCredit}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" forecolor="#D0B48E" 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> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{totalPeriodSolde}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="0" width="362" height="10" forecolor="#D0B48E" 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> + <text><![CDATA[Sous total + $F{period}]]></text> + </staticText> + </frame> + </band> + </columnFooter> +</jasperReport> 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/action/DocumentService.java index 70795ff..dfcefdd 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -62,7 +62,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; -import java.util.Properties; import static org.nuiton.i18n.I18n.t; @@ -83,7 +82,7 @@ public class DocumentService { protected GeneralEntryBookReportService generalEntryBookReportService; - protected ProvisionalEntryBookReportService provisionalEntryBookReportService; + protected ProvisionalEntryBookReportService entryBookReportService; protected LedgerReportService ledgerReportService; @@ -97,11 +96,12 @@ public class DocumentService { protected AccountService accountService; - protected String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); + protected String path = LimaServiceConfig.getInstance().getReportsModelDir().getAbsolutePath(); protected final String BALANCE_FILE_PATH = path + File.separator + DocumentsEnum.BALANCE.getFileName() + ".pdf"; protected final String GENERAL_ENTRY_BOOK_REPORT_PDF_FILE_PATH = path + File.separator + DocumentsEnum.GENERAL_ENTRY_BOOK.getFileName() + ".pdf"; protected final String ENTRY_BOOKS_REPORT_PDF_FILE_PATH = path + File.separator + DocumentsEnum.ENTRY_BOOKS.getFileName() + ".pdf"; + protected final String LEDGER_REPORT_PDF_FILE_PATH = path + File.separator + DocumentsEnum.LEDGER.getFileName() + ".pdf"; public DocumentService() { identityService = LimaServiceFactory.getService(IdentityService.class); @@ -115,7 +115,7 @@ public class DocumentService { balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); - provisionalEntryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); + entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); reportBuilder = new ReportBuilder(); @@ -406,7 +406,7 @@ public class DocumentService { // String filePath = path + File.separator // + DocumentsEnum.VAT.getFileName() + ".pdf"; // -// String path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); +// String path = LimaServiceConfig.getInstance().getReportsModelDir().getAbsolutePath(); // // String filePathDefault = path + File.separator // + DocumentsEnum.VAT.getFileName() + "_default.pdf"; @@ -684,20 +684,20 @@ public class DocumentService { //############## General EntryBook ############# public DocumentReport createGeneralEntryBooksDocuments(Date beginDate, Date endDate, String currency) { - DocumentReport report = generalEntryBookReportService.getEntryBookDocumentReport(beginDate, endDate, currency, BigDecimalToString.getDecimalFormat()); + DocumentReport report = generalEntryBookReportService.getGeneralEntryBookDocumentReport(beginDate, endDate, currency, BigDecimalToString.getDecimalFormat()); reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.GENERAL_ENTRYBOOK, GENERAL_ENTRY_BOOK_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); return report; } public DocumentReport createEntryBooksDocuments(Date beginDate, Date endDate, List<String> entryBookCodes, String currency) { - DocumentReport report = provisionalEntryBookReportService.getProvisionalEntryBookDocumentReport(beginDate, endDate, entryBookCodes, currency, BigDecimalToString.getDecimalFormat()); + DocumentReport report = entryBookReportService.getEntryBookDocumentReport(beginDate, endDate, entryBookCodes, currency, BigDecimalToString.getDecimalFormat()); reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.ENTRYBOOKS, ENTRY_BOOKS_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); return report; } -// public DocumentReport createLedgerDocuments(Date beginDate, Date endDate, String currency) { -// DocumentReport report = ledgerReportService.getLedgerDocumentReport(beginDate, endDate, currency); -// reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.LEDGER, LEDGER_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); -// return report; -// } + public DocumentReport createLedgerDocuments(Date beginDate, Date endDate, String currency) { + DocumentReport report = ledgerReportService.getLedgerDocumentReport(beginDate, endDate, currency, BigDecimalToString.getDecimalFormat()); + reportBuilder.generatePDFReport(org.chorem.lima.business.utils.DocumentsEnum.LEDGER, LEDGER_REPORT_PDF_FILE_PATH, Lists.newArrayList(report)); + return report; + } } 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/balance/ReportBuilder.java index ff4238e..6862217 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/balance/ReportBuilder.java @@ -37,11 +37,9 @@ import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.utils.DocumentsEnum; -import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Properties; /** * Created by davidcosse on 02/10/14. @@ -52,7 +50,7 @@ public class ReportBuilder { protected JasperReport balanceReport; protected JasperReport generalEntryBookReport; - protected JasperReport provisionalEntryBookReport; + protected JasperReport entryBookReport; protected Map<DocumentsEnum, JasperReport> reportsByDocumentType; public ReportBuilder() { @@ -60,14 +58,14 @@ public class ReportBuilder { LimaServiceConfig config = LimaServiceConfig.getInstance(); // compile phase - balanceReport= JasperCompileManager.compileReport(config.getBalanceReportPath()); - generalEntryBookReport = JasperCompileManager.compileReport(config.getGeneralEntryBookEntryBookMainReportPath()); - provisionalEntryBookReport = JasperCompileManager.compileReport(config.getProvisionalEntryBookEntryBookMainReportPath()); + balanceReport= JasperCompileManager.compileReport(config.getBalanceDocumentReportModelPath()); + generalEntryBookReport = JasperCompileManager.compileReport(config.getGeneralEntryBookDocumentReportModelPath()); + entryBookReport = JasperCompileManager.compileReport(config.getEntryBookDocumentReportModelPath()); reportsByDocumentType = Maps.newHashMap(); reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceReport); reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRYBOOK, generalEntryBookReport); - reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, provisionalEntryBookReport); + reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, entryBookReport); } catch (JRException e) { throw new LimaTechnicalException(e); } 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 feb90be..451b0ed 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 @@ -58,7 +58,6 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; -import java.util.Properties; import static org.nuiton.i18n.I18n.t; @@ -81,7 +80,7 @@ public class HttpServerService { protected ReportBuilder reportBuilder; public HttpServerService() { - //File reportDir = (File) props.get("REPORTS_DIR"); + //File reportDir = (File) props.get("REPORTS_MODEL_DIR"); //path = reportDir.getAbsolutePath(); port = LimaServiceConfig.getInstance().getHttpPort(); accountService = LimaServiceFactory.getService(AccountService.class); @@ -94,7 +93,7 @@ public class HttpServerService { if (server == null) { try { LimaServiceConfig config = LimaServiceConfig.getInstance(); - File reportDir = config.getReportsDir(); + File reportDir = config.getReportsModelDir(); FileUtil.createDirectoryIfNecessary(reportDir); @@ -223,7 +222,7 @@ public class HttpServerService { IOUtils.write(report, out, Charsets.UTF_8); } else { LimaServiceConfig config = LimaServiceConfig.getInstance(); - File reportDir = config.getReportsDir(); + File reportDir = config.getReportsModelDir(); String path = reportDir.getAbsolutePath(); URL doc = new URL("file:" + path + File.separator + model + ".pdf"); if (log.isDebugEnabled()) { -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 8138d5b0ebff1c6296cdad4320fcb50b7843c1e2 Author: dcosse <japbiw74> Date: Thu Jan 22 18:12:42 2015 +0100 refs #769 services for Leger report --- .../chorem/lima/business/LimaServiceConfig.java | 40 ++++ .../lima/business/ejb/ReportServiceImpl.java | 1 - .../ejb/report/BalanceReportServiceImpl.java | 2 +- .../report/GeneralEntryBookReportServiceImpl.java | 3 +- .../ejb/report/LedgerReportServiceImpl.java | 201 ++++++++++----------- .../ProvisionalEntryBookReportServiceImpl.java | 2 +- .../resources/i18n/lima-business_fr_FR.properties | 1 + lima-callao/src/main/xmi/accounting-model.zargo | Bin 55585 -> 56859 bytes lima-web/src/main/assembly/bin.xml | 35 ++++ .../chorem/lima/web/action/DocumentService.java | 137 -------------- .../chorem/lima/web/service/HttpServerService.java | 3 +- 11 files changed, 179 insertions(+), 246 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index ef75c48..aeb870c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -376,6 +376,43 @@ public class LimaServiceConfig { config.setOption(ServiceConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key, path); config.saveForUser(); } + + public String getGeneralLedgerDocumentReportModelPath() { + String result = config.getOption(ServiceConfigOption. + GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.getKey()); + return result; + } + + public void setGeneralLedgerDocumentReportModelPath(String path) { + config.setOption(ServiceConfigOption. + GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.key, path); + config.saveForUser(); + } + + public String getGeneralLedgerModelPath() { + String result = config.getOption(ServiceConfigOption. + GENERAL_LEDGER_MODEL_PATH.getKey()); + return result; + } + + public void setGeneralLedgerModelPath(String path) { + config.setOption(ServiceConfigOption. + GENERAL_LEDGER_MODEL_PATH.key, path); + config.saveForUser(); + } + + public String getGeneralLedgerEntryModelPath() { + String result = config.getOption(ServiceConfigOption. + GENERAL_LEDGER_ENTRY_MODEL_PATH.getKey()); + return result; + } + + public void setGeneralLedgerEntryModelPath(String path) { + config.setOption(ServiceConfigOption. + GENERAL_LEDGER_ENTRY_MODEL_PATH.key, path); + config.saveForUser(); + } + // ** FIN REPORT PART ** @@ -413,6 +450,9 @@ public class LimaServiceConfig { ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.financialPeriodModelPath", n("lima.config.documentReport.entrybook.financialPeriodModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/FinancialPeriodReport.jrxml", String.class, false, false), ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.transactionReportModelPath", n("lima.config.documentReport.entrybook.transactionReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml", String.class, false, false), + GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalLedger.documentReportModelPath", n("lima.config.documentReport.generalLedger.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/DocumentReport.jrxml", String.class, false, false), + GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerReport.jrxml", String.class, false, false), + GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerEntryReport.jrxml", String.class, false, false), SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", "", "false", Boolean.class, false, false), diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java index de3d142..94459e6 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java @@ -303,7 +303,6 @@ public class ReportServiceImpl extends AbstractLimaService implements ReportServ List<Account> accounts; //Remove Spaces - // TODO DCossé 12/06/14 selectedAccounts is allways NULL String result = StringUtils.deleteWhitespace(selectedAccounts); //if no filter account if (result == null || result.equals("")) { 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 a8cccf1..c02a85a 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,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal documentReport.setFormatter(bigDecimalFormat); Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + documentReport.setCompanyName(identity.getName()); // 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 0d0cd36..442aaac 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 @@ -4,7 +4,6 @@ import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; @@ -82,7 +81,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + documentReport.setCompanyName(identity.getName()); // 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 425bbe9..a7cbe4e 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 @@ -1,17 +1,26 @@ package org.chorem.lima.business.ejb.report; +import com.google.common.base.Preconditions; +import org.apache.commons.lang3.StringUtils; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.DocumentReportImpl; +import org.chorem.lima.beans.GeneralLedger; +import org.chorem.lima.beans.GeneralLedgerEntry; +import org.chorem.lima.beans.GeneralLedgerEntryImpl; +import org.chorem.lima.beans.GeneralLedgerImpl; import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.LimaServiceConfig; +import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.ReportService; -import org.chorem.lima.business.api.report.GeneralEntryBookReportService; import org.chorem.lima.business.api.report.LedgerReportService; import org.chorem.lima.business.ejb.AbstractLimaService; 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 javax.ejb.EJB; import javax.ejb.Remote; @@ -37,108 +46,96 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg @EJB protected ReportService reportService; + @EJB + protected IdentityService identityService; + + protected static final String TITLE = t("lima-business.document.ledger"); + @Override public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, String currency, DecimalFormat decimalFormat) { - return null; -// List<Object> list = new ArrayList<Object>(); -// -// if (beginDate != null && endDate != null) { -// try { -// -// BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); -// if (balanceTrial.getReportsDatas() != null) { -// for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { -// list.add(reportsDatas); -// List<Entry> entries = reportsDatas.getListEntry(); -// if (entries != null) { -// Collections.sort(entries, new EntryComparator()); -// list.addAll(entries); -// } -// } -// } -// -// //create pages -// int i = 0; -// int n = list.size(); -// -// boolean even = true; -// BigDecimal currentAmountDebit =BigDecimal.ZERO; -// BigDecimal currentAmountCredit =BigDecimal.ZERO; -// -// while (i < n) { -// -// int indexEntry = -1; -// -// for (Object object : list) { -// if (object instanceof ReportsDatas) { -// -//// ReportsDatas reportsDatas = (ReportsDatas) object; -//// -//// String accountS = ""; -//// Account account = reportsDatas.getAccount(); -//// if (account != null) { -//// accountS = account.getAccountNumber() + "\t" + account.getLabel(); -//// } -//// BigDecimal amountCredit = reportsDatas.getAmountCredit(); -//// BigDecimal amountDebit = reportsDatas.getAmountDebit(); -//// -//// String [] columnsTable = {accountS, -//// amountDebit.toString(), amountCredit.toString(), -//// amountDebit.subtract(amountCredit).toString()}; -// -// } else { -// indexEntry++; -// Entry entry = (Entry) object; -// -// String entryBookCode = ""; -// EntryBook entryBook = entry.getFinancialTransaction().getEntryBook(); -// if (entryBook != null) { -// entryBookCode = entryBook.getCode(); -// } -// BigDecimal amountDebit = BigDecimal.ZERO, -// amountCredit = BigDecimal.ZERO; -// if (entry.isDebit()) { -// amountDebit = entry.getAmount(); -// } else { -// amountCredit = entry.getAmount(); -// } -// -// String [] columnsTable = {t("lima-business.document.dateformat",entry.getFinancialTransaction().getTransactionDate()), -// entryBookCode, entry.getVoucher(), entry.getDescription(), -// amountDebit.toString(), amountCredit.toString(), amountDebit.subtract(amountCredit).toString()}; -// ledgerReport += constructTableLine(columnsTable, even); -// even = !even; -// } -// } -// -// // close inner -// ledgerReport += "</tbody></table>" + -// "</td>" + -// "</tr>"; -// -// for (Object objectList : list) { -// if (objectList instanceof Entry) { -// Entry entry = (Entry) objectList; -// if (entry.isDebit()) { -// currentAmountDebit = currentAmountDebit.add(entry.getAmount()); -// } else { -// currentAmountCredit = currentAmountCredit.add(entry.getAmount()); -// } -// } -// } -// -// i = i + n; -// } -// //final amounts -// String [] columnsTable = { boldBegin + t("lima-business.document.amounts") + boldEnd, -// boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, -// boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; -// ledgerReport += constructTableLine(columnsTable, even); -// -// -// } catch (Exception ex) { -// throw new LimaTechnicalException("Can't create document", ex); -// } -// } + String generalLedgerReportModelPath = LimaServiceConfig.getInstance().getGeneralLedgerModelPath(); + String generalLedgerEntryModelPath = LimaServiceConfig.getInstance().getGeneralLedgerEntryModelPath(); + + Preconditions.checkArgument(StringUtils.isNoneBlank(generalLedgerReportModelPath)); + Preconditions.checkArgument(StringUtils.isNoneBlank(generalLedgerEntryModelPath)); + + DocumentReport result = new DocumentReportImpl(); + result.setFormatter(decimalFormat); + result.setCurrency(currency); + //result.setFromAccount(); + //result.setToAccount(); + result.setFromDate(beginDate); + result.setToDate(endDate); + result.setSubReportPath(""); + result.setTitle(TITLE); + + Identity identity = identityService.getIdentity(); + result.setCompanyName(identity.getName()); + result.setSubReportPath(generalLedgerReportModelPath); + + + if (beginDate != null && endDate != null) { + try { + + BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); + if (balanceTrial.getReportsDatas() != null) { + for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { + + List<Entry> entries = reportsDatas.getListEntry(); + if (entries != null) { + Account account = reportsDatas.getAccount(); + + if (account != null) { + GeneralLedger generalLedger = new GeneralLedgerImpl(); + generalLedger.setFormatter(decimalFormat); + generalLedger.setAccountNumber(account.getAccountNumber()); + generalLedger.setLabel(account.getLabel()); + BigDecimal amountCredit = reportsDatas.getAmountCredit(); + BigDecimal amountDebit = reportsDatas.getAmountDebit(); + generalLedger.setDebit(amountDebit); + generalLedger.setCredit(amountCredit); + generalLedger.setSolde(amountDebit.subtract(amountCredit)); + generalLedger.setSubReportPath(generalLedgerEntryModelPath); + + result.addGeneralLedgers(generalLedger); + + Collections.sort(entries, new EntryComparator()); + + for (Entry entry : entries) { + String entryBookCode = ""; + EntryBook entryBook = entry.getFinancialTransaction().getEntryBook(); + if (entryBook != null) { + entryBookCode = entryBook.getCode(); + } + BigDecimal entryAmountDebit = BigDecimal.ZERO, entryAmountCredit = BigDecimal.ZERO; + + if (entry.isDebit()) { + entryAmountDebit = entry.getAmount(); + } else { + entryAmountCredit = entry.getAmount(); + } + + GeneralLedgerEntry generalLedgerEntry = new GeneralLedgerEntryImpl(); + generalLedgerEntry.setFormatter(decimalFormat); + generalLedgerEntry.setDate(entry.getFinancialTransaction().getTransactionDate()); + generalLedgerEntry.setEntrybook(entryBookCode); + generalLedgerEntry.setVoucher(entry.getVoucher()); + generalLedgerEntry.setDescription(entry.getDescription()); + generalLedgerEntry.setDebit(entryAmountDebit); + generalLedgerEntry.setCredit(entryAmountCredit); + generalLedgerEntry.setSolde(entryAmountDebit.subtract(entryAmountCredit)); + + generalLedger.addEntries(generalLedgerEntry); + } + } + + } + } + } + } catch (Exception ex) { + throw new LimaTechnicalException("Can't create document", ex); + } + } + return result; } } 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 d21faa1..f96b261 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,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo if (beginDate != null && endDate != null) { Identity identity = identityService.getIdentity(); - documentReport.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + documentReport.setCompanyName(identity.getName()); // general infos about balance report documentReport.setTitle(TITLE); diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 8a3a976..2e901ed 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -139,6 +139,7 @@ lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.descr lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' +lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedgerEntry' lima.config.httpport.description=Port HTTP lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index ca852d6..3e18915 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-web/src/main/assembly/bin.xml b/lima-web/src/main/assembly/bin.xml index 90d5813..936c074 100644 --- a/lima-web/src/main/assembly/bin.xml +++ b/lima-web/src/main/assembly/bin.xml @@ -63,5 +63,40 @@ <include>*.pdf</include> </includes> </fileSet> + <fileSet> + <directory>src/main/jasperreports/accounts</directory> + <outputDirectory>jasperreports</outputDirectory> + <includes> + <include>*.jrxml</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/jasperreports/balance</directory> + <outputDirectory>jasperreports</outputDirectory> + <includes> + <include>*.jrxml</include> + </includes> + </fileSet> </fileSets> + <fileSet> + <directory>src/main/jasperreports/entryBook</directory> + <outputDirectory>jasperreports</outputDirectory> + <includes> + <include>*.jrxml</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/jasperreports/generalEntryBook</directory> + <outputDirectory>jasperreports</outputDirectory> + <includes> + <include>*.jrxml</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/jasperreports/ledger</directory> + <outputDirectory>jasperreports</outputDirectory> + <includes> + <include>*.jrxml</include> + </includes> + </fileSet> </assembly> 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/action/DocumentService.java index dfcefdd..4db1fe4 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -261,143 +261,6 @@ public class DocumentService { return financialReport; } - //############## Ledger ############## - public String createLedgerDocuments(Date beginDate, - Date endDate) { - - List<Object> list = new ArrayList<Object>(); - String ledgerReport = constructHtmlHeader(t("lima-business.document.ledger")); - - if (beginDate != null && endDate != null) { - try { - String boldBegin = "<b>"; - String boldEnd = "</b>"; - - BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); - if (balanceTrial.getReportsDatas() != null) { - for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { - list.add(reportsDatas); - List<Entry> entries = reportsDatas.getListEntry(); - if (entries != null) { - Collections.sort(entries, new EntryComparator()); - list.addAll(entries); - } - } - } - - //create pages - int i = 0; - int n = list.size(); - - boolean even = true; - BigDecimal currentAmountDebit =BigDecimal.ZERO; - BigDecimal currentAmountCredit =BigDecimal.ZERO; - - while (i < n) { - - ledgerReport += constructHeaderTitle(t("lima-business.document.ledger"), beginDate, endDate); - - ledgerReport += "<table align=\"left\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n"; - - String [] columnsNames = {t("lima-business.document.account"), t("lima-business.document.debit"), - t("lima-business.document.credit"), t("lima-business.document.solde")}; - ledgerReport += constructTableHeader(columnsNames); - ledgerReport += "<tbody>\n"; - - int indexEntry = -1; - - for (Object object : list) { - if (object instanceof ReportsDatas) { - if (indexEntry != -1) { - indexEntry = -1; - ledgerReport += "</tbody></table>" + - "</td>" + - "</tr>"; - } - ReportsDatas reportsDatas = (ReportsDatas) object; - - String accountS = ""; - Account account = reportsDatas.getAccount(); - if (account != null) { - accountS = account.getAccountNumber() + "\t" + account.getLabel(); - } - BigDecimal amountCredit = reportsDatas.getAmountCredit(); - BigDecimal amountDebit = reportsDatas.getAmountDebit(); - - String [] columnsTable = {accountS, - amountDebit.toString(), amountCredit.toString(), - amountDebit.subtract(amountCredit).toString()}; - ledgerReport += constructTableHeader(columnsTable); - - } else { - indexEntry++; - Entry entry = (Entry) object; - - String entryBookCode = ""; - EntryBook entryBook = entry.getFinancialTransaction().getEntryBook(); - if (entryBook != null) { - entryBookCode = entryBook.getCode(); - } - BigDecimal amountDebit = BigDecimal.ZERO, - amountCredit = BigDecimal.ZERO; - if (entry.isDebit()) { - amountDebit = entry.getAmount(); - } else { - amountCredit = entry.getAmount(); - } - - ledgerReport +="<tr>"; - if (indexEntry == 0) { - ledgerReport += "<td><table align=\"right\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" style=\"font-size:13px;\" >\n"; - String [] columnsEntry = {t("lima-business.document.date"), - t("lima-business.document.entrybook"), t("lima-business.document.voucher"), - t("lima-business.document.description"), t("lima-business.document.debit"), - t("lima-business.document.credit"), t("lima-business.document.solde")}; - ledgerReport += constructTableHeader(columnsEntry); - ledgerReport += "<tbody>"; - } - - String [] columnsTable = {t("lima-business.document.dateformat",entry.getFinancialTransaction().getTransactionDate()), - entryBookCode, entry.getVoucher(), entry.getDescription(), - amountDebit.toString(), amountCredit.toString(), amountDebit.subtract(amountCredit).toString()}; - ledgerReport += constructTableLine(columnsTable, even); - even = !even; - } - } - - // close inner - ledgerReport += "</tbody></table>" + - "</td>" + - "</tr>"; - - for (Object objectList : list) { - if (objectList instanceof Entry) { - Entry entry = (Entry) objectList; - if (entry.isDebit()) { - currentAmountDebit = currentAmountDebit.add(entry.getAmount()); - } else { - currentAmountCredit = currentAmountCredit.add(entry.getAmount()); - } - } - } - - i = i + n; - } - //final amounts - String [] columnsTable = { boldBegin + t("lima-business.document.amounts") + boldEnd, - boldBegin + currentAmountDebit.toString() + boldEnd, boldBegin + currentAmountCredit.toString() + boldEnd, - boldBegin + currentAmountDebit.subtract(currentAmountCredit).toString() + boldEnd}; - ledgerReport += constructTableLine(columnsTable, even); - - - ledgerReport += "</tbody></table></body>\n</html>"; - } catch (Exception ex) { - throw new LimaTechnicalException("Can't create document", ex); - } - } - return ledgerReport; - } - //############## VAT ############## // public void createVatDocuments(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 451b0ed..fd97351 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 @@ -192,8 +192,7 @@ public class HttpServerService { beginDateFormat, endDateFormat); break; case LEDGER: - ledgerReport = documentService.createLedgerDocuments( - beginDateFormat, endDateFormat); + documentService.createLedgerDocuments(beginDateFormat, endDateFormat, "€"); break; case VAT: if (log.isDebugEnabled()) { -- 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/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 988f41d4b632ca207d60b07209b8f563e5d2f1b1 Author: dcosse <japbiw74> Date: Fri Jan 23 00:05:08 2015 +0100 refs #769 Leger report generation --- .../chorem/lima/business/LimaServiceConfig.java | 4 +- .../ejb/report/LedgerReportServiceImpl.java | 6 +- .../resources/i18n/lima-business_en_GB.properties | 3 + .../resources/i18n/lima-business_fr_FR.properties | 2 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 56859 -> 56954 bytes .../entryBook/TransactionReport.jrxml | 2 +- .../main/jasperreports/ledger/DocumentReport.jrxml | 285 ------------------- .../jasperreports/ledger/LedgerPeriodReport.jrxml | 301 --------------------- .../chorem/lima/web/action/DocumentService.java | 1 + .../lima/web/action/balance/ReportBuilder.java | 22 +- 10 files changed, 24 insertions(+), 602 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index aeb870c..b1caf54 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -451,8 +451,8 @@ public class LimaServiceConfig { ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH("lima.config.documentReport.entrybook.transactionReportModelPath", n("lima.config.documentReport.entrybook.transactionReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml", String.class, false, false), GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalLedger.documentReportModelPath", n("lima.config.documentReport.generalLedger.documentReportModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/DocumentReport.jrxml", String.class, false, false), - GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerReport.jrxml", String.class, false, false), - GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/generalLedgerEntryReport.jrxml", String.class, false, false), + GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/GeneralLedgerReport.jrxml", String.class, false, false), + GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), ROOT_PATH + "/lima-web/src/main/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml", String.class, false, false), SCALE("lima.scale", n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", "", "false", Boolean.class, false, false), 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 a7cbe4e..9c6506e 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 @@ -96,7 +96,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg generalLedger.setCredit(amountCredit); generalLedger.setSolde(amountDebit.subtract(amountCredit)); generalLedger.setSubReportPath(generalLedgerEntryModelPath); - + generalLedger.setNbEntries(balanceTrial.getReportsDatas().size()); result.addGeneralLedgers(generalLedger); Collections.sort(entries, new EntryComparator()); @@ -118,13 +118,13 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg GeneralLedgerEntry generalLedgerEntry = new GeneralLedgerEntryImpl(); generalLedgerEntry.setFormatter(decimalFormat); generalLedgerEntry.setDate(entry.getFinancialTransaction().getTransactionDate()); - generalLedgerEntry.setEntrybook(entryBookCode); + generalLedgerEntry.setEntryBook(entryBookCode); generalLedgerEntry.setVoucher(entry.getVoucher()); generalLedgerEntry.setDescription(entry.getDescription()); generalLedgerEntry.setDebit(entryAmountDebit); generalLedgerEntry.setCredit(entryAmountCredit); generalLedgerEntry.setSolde(entryAmountDebit.subtract(entryAmountCredit)); - + generalLedgerEntry.setNbEntries(entries.size()); generalLedger.addEntries(generalLedgerEntry); } } diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 5f2474e..7fd8ad5 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -137,6 +137,9 @@ lima.config.documentReport.entrybook.financialPeriodModelPath.description= lima.config.documentReport.entrybook.transactionReportModelPath.description= lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= +lima.config.documentReport.generalLedger.documentReportModelPath.description= +lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= +lima.config.documentReport.generalLedger.generalLedgerModelPath.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 2e901ed..fe80f59 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -138,8 +138,8 @@ lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBookEntry' lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' -lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedgerEntry' +lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.httpport.description=Port HTTP lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index 3e18915..50e0d42 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml index 282875c..dfe6ba9 100644 --- a/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml +++ b/lima-web/src/main/jasperreports/entryBook/TransactionReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-21T11:00:00 --> +<!-- 2015-01-22T21:52:42 --> <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="30" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> diff --git a/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml b/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml deleted file mode 100644 index aded66d..0000000 --- a/lima-web/src/main/jasperreports/ledger/DocumentReport.jrxml +++ /dev/null @@ -1,285 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-21T10:10:15 --> -<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="Arial" fontSize="8"/> - <style name="Bold" fontName="Arial" fontSize="8"/> - <style name="Oblique" fontName="Monospaced" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" 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="generalLedgers" class="java.util.List"/> - <field name="subReportPath" class="java.lang.String"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="fromAccount" class="java.lang.String"/> - <field name="toAccount" class="java.lang.String"/> - <variable name="entryBookPeriodReport" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{generalLedgers})]]></variableExpression> - </variable> - <group name="entryBookPeriodReport"/> - <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="25" 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> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="02c35c41-1b1f-4554-ab87-5403d63ae3d6"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> - </textField> - </band> - </pageHeader> - <columnHeader> - <band height="20"> - <frame> - <reportElement style="Column header" mode="Opaque" x="0" y="0" width="578" height="20" forecolor="#D0B48E" 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="60" 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[Date]]></text> - </staticText> - <staticText> - <reportElement x="60" y="0" width="40" 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="100" y="0" width="40" 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]]></text> - </staticText> - <staticText> - <reportElement x="140" y="0" width="222" 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[Intitulé]]></text> - </staticText> - <staticText> - <reportElement x="362" 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"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" 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="434" 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"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" 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> - <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"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" 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[Solde]]></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{entryBookPeriodReport}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{subReportPath})]]></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> diff --git a/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml b/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml deleted file mode 100644 index 370b349..0000000 --- a/lima-web/src/main/jasperreports/ledger/LedgerPeriodReport.jrxml +++ /dev/null @@ -1,301 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> -<!-- 2015-01-14T11:29:22 --> -<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="Arial"/> - <style name="Default oblique" fontName="Monospaced"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="date" class="java.util.Date"/> - <field name="entryBook" class="java.lang.String"/> - <field name="voucher" class="java.lang.String"/> - <field name="libelle" class="java.lang.String"/> - <field name="debit" class="java.math.BigDecimal"/> - <field name="credit" class="java.math.BigDecimal"/> - <field name="solde" class="java.math.BigDecimal"/> - <field name="period" class="java.lang.String"/> - <field name="accountNumber" class="java.lang.String"/> - <field name="accountLabel" class="java.lang.String"/> - <variable name="totalPeriodDebit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{debit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalPeriodCredit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{credit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalPeriodSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountDebit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{debit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountCredit" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{credit}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="totalAccountSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> - </variable> - <variable name="solde1" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> - </variable> - <pageHeader> - <band height="10"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <frame> - <reportElement mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#D0B48E" backcolor="#FDCA97" uuid="644d4927-8973-45d7-bd80-0512dad33987"> - <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="60" height="10" uuid="be71eb35-fb58-473a-8ac1-07d658474372"> - <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> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="60" y="0" width="518" height="10" uuid="c2b6613a-5505-4f7b-8aba-79e247b3edc6"> - <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"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <textFieldExpression><![CDATA[$F{accountLabel}]]></textFieldExpression> - </textField> - </frame> - </band> - </pageHeader> - <detail> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="60" 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="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="60" y="0" width="40" 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="true"/> - <paragraph lineSpacingSize="0.0" leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{entryBook}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="100" y="0" width="40" 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="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="140" y="0" width="222" 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="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="362" 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="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" 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="true"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" 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> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$F{solde}]]></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="362" y="0" width="72" height="10" forecolor="#D0B48E" 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> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodDebit}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="434" y="0" width="72" height="10" forecolor="#D0B48E" 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> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodCredit}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="506" y="0" width="72" height="10" forecolor="#D0B48E" 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> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$V{totalPeriodSolde}]]></textFieldExpression> - </textField> - <staticText> - <reportElement x="0" y="0" width="362" height="10" forecolor="#D0B48E" 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> - <text><![CDATA[Sous total + $F{period}]]></text> - </staticText> - </frame> - </band> - </columnFooter> -</jasperReport> 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/action/DocumentService.java index 4db1fe4..3369e9a 100644 --- a/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -116,6 +116,7 @@ public class DocumentService { balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); + ledgerReportService = LimaServiceFactory.getService(LedgerReportService.class); reportBuilder = new ReportBuilder(); 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/balance/ReportBuilder.java index 6862217..a7cf255 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/balance/ReportBuilder.java @@ -48,9 +48,10 @@ public class ReportBuilder { private static final Log log = LogFactory.getLog(ReportBuilder.class); - protected JasperReport balanceReport; - protected JasperReport generalEntryBookReport; - protected JasperReport entryBookReport; + protected JasperReport balanceDocumentReport; + protected JasperReport generalEntryBookDocumentReport; + protected JasperReport entryBookDocumentReport; + protected JasperReport generalLedgerDocumentReport; protected Map<DocumentsEnum, JasperReport> reportsByDocumentType; public ReportBuilder() { @@ -58,14 +59,17 @@ public class ReportBuilder { LimaServiceConfig config = LimaServiceConfig.getInstance(); // compile phase - balanceReport= JasperCompileManager.compileReport(config.getBalanceDocumentReportModelPath()); - generalEntryBookReport = JasperCompileManager.compileReport(config.getGeneralEntryBookDocumentReportModelPath()); - entryBookReport = JasperCompileManager.compileReport(config.getEntryBookDocumentReportModelPath()); + balanceDocumentReport = JasperCompileManager.compileReport(config.getBalanceDocumentReportModelPath()); + generalEntryBookDocumentReport = JasperCompileManager.compileReport(config.getGeneralEntryBookDocumentReportModelPath()); + entryBookDocumentReport = JasperCompileManager.compileReport(config.getEntryBookDocumentReportModelPath()); + generalLedgerDocumentReport = JasperCompileManager.compileReport(config.getGeneralLedgerDocumentReportModelPath()); + reportsByDocumentType = Maps.newHashMap(); - reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceReport); - reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRYBOOK, generalEntryBookReport); - reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, entryBookReport); + reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceDocumentReport); + reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRYBOOK, generalEntryBookDocumentReport); + reportsByDocumentType.put(DocumentsEnum.ENTRYBOOKS, entryBookDocumentReport); + reportsByDocumentType.put(DocumentsEnum.LEDGER, generalLedgerDocumentReport); } catch (JRException e) { throw new LimaTechnicalException(e); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm