branch develop updated (fd35125 -> 3d5a336)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository lima. See http://git.chorem.org/lima.git from fd35125 Merge branch 'feature/1158' into develop new f0e4f29 refs #1241 gérération des rapport de compte avec Jasper new 03e84c6 refs #1241 gérération des rapport de compte avec Jasper new 4c16fcb refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné new e9c8126 refs #1241 modification de l'affichage des infos new ce734ff refs #1241 factorisation du code source Jasper, utilisation de style new 643e3a5 refs #1241 correction sur nom de police new 9afd18d refs #1241 refactoring new b019126 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports new 8b18d5e refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données new dedb5b9 refs #1241 mise à jour du plan de TVA new 9a297ab refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA new f56fee1 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité new cfd3f21 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider new 797522f refs #1241 pas de changement dans l'interface de configuration du premier lancement new 9c2a471 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. new 6c63783 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima new 7cc39ee refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports new b4373cd refs #1241mise à jour du plan de tva new 21cbf77 refs #1241 minor new e8e622e refs #1241 internationalisation sur le rapport de compte new 5a144b5 refs #1241 internationalisation sur le rapport de compte new 887373c refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) new b8a6ceb refs #1241 monté de version je Jasper report new 6f487bf refs #1241 refactoring de code new 1179c09 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. new 4e94d24 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. new 0919fa5 refs #1241 Ajout de traductions new 7f54c9e refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe new 5655683 correction suite au merge new 3d5a336 Merge branch 'feature/1241-account-report' into develop The 30 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 3d5a3364505d0efad7a7180492a7a9e750d924c7 Merge: fd35125 5655683 Author: dcosse <cosse@codelutin.com> Date: Mon Nov 30 11:45:12 2015 +0100 Merge branch 'feature/1241-account-report' into develop commit 565568322a6302b26e45ada947e8e93aa5075513 Author: dcosse <cosse@codelutin.com> Date: Mon Nov 30 11:43:46 2015 +0100 correction suite au merge commit 7f54c9e7f90cea3d576e8d2c44c05a69f89b7b0c Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 15:00:36 2015 +0200 refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe commit 0919fa58b571e38dedb5d0b604f2e5fa44e5dc1f Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:44:30 2015 +0200 refs #1241 Ajout de traductions commit 4e94d244f52771c681529ceda1a781cb914ec610 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:35:19 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. commit 1179c093d61c0c745d73f11a86f658066f078421 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:34:40 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. commit 6f487bfcfab4a1c2775746c314e14b9387992465 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 9 15:21:41 2015 +0200 refs #1241 refactoring de code commit b8a6ceb2670186b6b079c3b7ed4b8140dedec6ba Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:50 2015 +0200 refs #1241 monté de version je Jasper report commit 887373c77477f6f7919b0c05009b679ca385de4d Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:30 2015 +0200 refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) commit 5a144b57c3704298550de84c67656d0da796ab55 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:41 2015 +0200 refs #1241 internationalisation sur le rapport de compte commit e8e622ed5486d9932ddd4fbc6bf5fd3d72e1c08c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:14 2015 +0200 refs #1241 internationalisation sur le rapport de compte commit 21cbf7748f6e2fedbd3a0f22e8e8971258a3fa64 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:14:52 2015 +0200 refs #1241 minor commit b4373cd69ed0adc9b183349ad0a7577386e3a687 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:13:36 2015 +0200 refs #1241mise à jour du plan de tva commit 7cc39ee6473b0d5c64fca2ecbeb0ccf706b828a0 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 30 17:10:33 2015 +0200 refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports commit 6c63783fdab3a94f352d996d8cbf3965385372a3 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:48:02 2015 +0200 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima commit 9c2a4711664117acab90fef3eff32bca36d1d76b Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:42:15 2015 +0200 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. commit 797522fb4be6b4621d5e239c17e4a937dab1ebce Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:24:55 2015 +0200 refs #1241 pas de changement dans l'interface de configuration du premier lancement commit cfd3f21f337b317721a4c5a783c1d7edfd0a4d82 Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:15:46 2015 +0200 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider commit f56fee1b2f0b1e6c4f68e4a2f3bde6399ed40c1f Author: dcosse <cosse@codelutin.com> Date: Fri Jul 24 18:29:55 2015 +0200 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité commit 9a297abd96f72ce21857cec80d89618097081050 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 23 18:47:02 2015 +0200 refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA commit dedb5b9517d25302a35dc92a8be287b3596dd678 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 22 10:18:41 2015 +0200 refs #1241 mise à jour du plan de TVA commit 8b18d5e8b4dc9168960b1f7d4062cadd11386ebf Author: dcosse <cosse@codelutin.com> Date: Mon Jul 20 09:53:04 2015 +0200 refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données commit b01912625c723f6e6274b5453fc1fe6b0f708469 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 7 16:41:55 2015 +0200 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports commit 9afd18d63faa9b966fc50beda3e2573cc7fd47b3 Author: dcosse <cosse@codelutin.com> Date: Fri Jul 3 18:24:09 2015 +0200 refs #1241 refactoring commit 643e3a559e055debe3110b43c172ba111342d10b Author: dcosse <cosse@codelutin.com> Date: Thu Jul 2 15:08:14 2015 +0200 refs #1241 correction sur nom de police commit ce734ffebd6f09260dd5f220a56d109ba17ef245 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 1 17:42:23 2015 +0200 refs #1241 factorisation du code source Jasper, utilisation de style commit e9c81264aac8c378b8df4146415b17e623c6d065 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 12:05:27 2015 +0200 refs #1241 modification de l'affichage des infos commit 4c16fcbfa4fd587e9a5cbfcce97a5ece73ed0864 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 10:14:15 2015 +0200 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné commit 03e84c68bbffd4caeefa3c9d4dbd43721789d942 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:53:48 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper commit f0e4f29b522a5df7483ca49cc5e1a278f290dbd9 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:52:55 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper Summary of changes: .../chorem/lima/business/api/AccountService.java | 6 + .../chorem/lima/business/api/EntryBookService.java | 6 + .../chorem/lima/business/api/ImportService.java | 11 + .../chorem/lima/business/api/OptionsService.java | 3 + .../chorem/lima/business/api/TreasuryService.java | 13 + ...eportService.java => AccountReportService.java} | 14 +- .../business/api/report/BalanceReportService.java | 19 +- .../chorem/lima/business/LimaBusinessConfig.java | 22 +- .../lima/business/ejb/AccountServiceImpl.java | 7 + .../lima/business/ejb/EntryBookServiceImpl.java | 7 + .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../lima/business/ejb/OptionsServiceImpl.java | 6 + .../lima/business/ejb/TreasuryServiceImpl.java | 69 +++ .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../lima/business/ejb/csv/IdentityModel.java | 4 +- .../ejb/report/AccountReportServiceImpl.java | 125 ++++++ .../ejb/report/BalanceReportServiceImpl.java | 325 ++++++++++---- .../business/ejb/report/CommonsDocumentReport.java | 57 +++ .../report/GeneralEntryBookReportServiceImpl.java | 43 +- .../ejb/report/LedgerReportServiceImpl.java | 41 +- .../ProvisionalEntryBookReportServiceImpl.java | 64 +-- .../resources/i18n/lima-business_en_GB.properties | 56 +++ .../resources/i18n/lima-business_fr_FR.properties | 56 +++ .../org/chorem/lima/beans/BalanceAccountImpl.java | 23 +- ...ql => V0_8_6_0__1241_create_table_TREASURY.sql} | 52 ++- .../src/main/xmi/lima-callao-model.properties | 2 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57316 -> 61665 bytes lima-report/pom.xml | 10 +- .../chorem/lima/report/DocumentReportTypes.java | 1 + .../java/org/chorem/lima/report/DocumentsEnum.java | 4 +- .../org/chorem/lima/report/LimaReportConfig.java | 60 ++- .../lima/report/service/DocumentService.java | 321 ++++++-------- .../chorem/lima/report/service/JasperReports.java | 10 + .../AccountEntry.jrxml} | 170 ++++---- .../jasperreports/account/DocumentReport.jrxml | 266 ++++++++++++ .../balance/BalanceReportAccountReport.jrxml | 18 +- .../balance/BalanceSubAccountsReport.jrxml | 54 ++- .../jasperreports/balance/DocumentReport.jrxml | 387 ++++++++++------- .../jasperreports/entryBook/DocumentReport.jrxml | 394 ++++++++--------- .../jasperreports/entryBook/EntryBookReport.jrxml | 77 +--- .../entryBook/FinancialPeriodReport.jrxml | 191 ++------ .../entryBook/TransactionReport.jrxml | 222 +++------- .../generalEntryBook/DocumentReport.jrxml | 478 ++++++++++----------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 54 +-- .../GeneralEntryBookEntryReport.jrxml | 11 +- .../generalLedger/DocumentReport.jrxml | 406 +++++++++-------- .../generalLedger/GeneralLedgerEntryReport.jrxml | 204 +++------ .../generalLedger/GeneralLedgerReport.jrxml | 113 ++--- .../src/main/resources/reports/vat_form_fr.pdf | Bin 222623 -> 244238 bytes .../org/chorem/lima/report/action/ReportTest.java | 2 +- .../org/chorem/lima/server/HttpServerService.java | 41 +- .../main/java/org/chorem/lima/LimaSwingConfig.java | 1 + .../java/org/chorem/lima/ui/MainViewHandler.java | 13 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 161 +++++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 281 +++++++----- .../chorem/lima/ui/identity/IdentityHandler.java | 45 +- .../chorem/lima/ui/importexport/ImportExport.java | 8 + .../BackupPanel.css} | 10 +- ...{CreateEntryBookPanel.jaxx => BackupPanel.jaxx} | 8 +- .../{OpeningView.css => BackupPanelHandler.java} | 42 +- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 10 +- .../lima/ui/opening/CreateIdentityPanel.jaxx | 64 ++- .../ui/opening/CreateIdentityPanelHandler.java | 1 - .../org/chorem/lima/ui/opening/OpeningView.css | 11 +- .../org/chorem/lima/ui/opening/OpeningView.jaxx | 28 +- .../chorem/lima/ui/opening/OpeningViewHandler.java | 164 +++++-- .../resources/i18n/lima-swing_en_GB.properties | 58 ++- .../resources/i18n/lima-swing_fr_FR.properties | 39 +- lima-swing/src/main/resources/icons/backup.png | Bin 0 -> 4803 bytes lima-swing/src/main/resources/import/vat_base.csv | 114 ++--- .../src/main/resources/import/vat_default.csv | 111 ++--- pom.xml | 8 +- 72 files changed, 3315 insertions(+), 2406 deletions(-) create mode 100644 lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java copy lima-business-api/src/main/java/org/chorem/lima/business/api/report/{BalanceReportService.java => AccountReportService.java} (63%) create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java copy lima-callao/src/main/resources/db/migration/{V0_6_0_0__migration2.sql => V0_8_6_0__1241_create_table_TREASURY.sql} (50%) copy lima-report/src/main/resources/jasperreports/{generalLedger/GeneralLedgerEntryReport.jrxml => account/AccountEntry.jrxml} (69%) create mode 100644 lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml copy lima-swing/src/main/java/org/chorem/lima/ui/{fiscalperiod/RetainedEarningsWait.css => opening/BackupPanel.css} (88%) copy lima-swing/src/main/java/org/chorem/lima/ui/opening/{CreateEntryBookPanel.jaxx => BackupPanel.jaxx} (80%) copy lima-swing/src/main/java/org/chorem/lima/ui/opening/{OpeningView.css => BackupPanelHandler.java} (61%) create mode 100644 lima-swing/src/main/resources/icons/backup.png -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit f0e4f29b522a5df7483ca49cc5e1a278f290dbd9 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:52:55 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper --- .../business/api/report/AccountReportService.java | 46 +++++++++ .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../ejb/report/AccountReportServiceImpl.java | 109 +++++++++++++++++++++ lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57316 -> 57764 bytes .../chorem/lima/report/DocumentReportTypes.java | 1 + .../org/chorem/lima/report/LimaReportConfig.java | 38 +++---- .../lima/report/service/DocumentService.java | 95 +++--------------- .../chorem/lima/report/service/JasperReports.java | 10 ++ 8 files changed, 202 insertions(+), 99 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java new file mode 100644 index 0000000..b6a29c9 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/AccountReportService.java @@ -0,0 +1,46 @@ +package org.chorem.lima.business.api.report; + +/* + * #%L + * Lima :: business API + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JasperReport; +import org.chorem.lima.beans.DocumentReport; + +import java.text.DecimalFormat; +import java.util.Date; + +/** + * Created by davidcosse on 26/26/15. + */ +public interface AccountReportService { + + /** + * Generate the necessary beans to make account report. + * + * @param account requested account + * @param from from date + * @param to to date + * @param bigDecimalFormat format used for amount representation + * @return model for account report + */ + DocumentReport getAccountDocumentReport(String account, Date from, Date to, JasperReport accountsJasperReport, DecimalFormat bigDecimalFormat); +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java index 241cae1..e1dcccb 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/FiscalControlExportModel.java @@ -23,7 +23,7 @@ package org.chorem.lima.business.ejb.csv; */ import com.google.common.collect.Maps; -import org.chorem.lima.beans.Account; +import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialTransaction; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java new file mode 100644 index 0000000..8251a9a --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -0,0 +1,109 @@ +package org.chorem.lima.business.ejb.report; + +import net.sf.jasperreports.engine.JasperReport; +import org.apache.commons.collections4.CollectionUtils; +import org.chorem.lima.beans.AccountEntry; +import org.chorem.lima.beans.AccountEntryImpl; +import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.DocumentReportImpl; +import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.report.AccountReportService; +import org.chorem.lima.business.ejb.AbstractLimaService; +import org.chorem.lima.entity.Account; +import org.chorem.lima.entity.AccountTopiaDao; +import org.chorem.lima.entity.Entry; +import org.chorem.lima.entity.Identity; + +import javax.ejb.EJB; +import javax.ejb.Remote; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +/** + * Created by davidcosse on 26/06/15. + */ +@Stateless +@Remote(AccountReportService.class) +@TransactionAttribute +public class AccountReportServiceImpl extends AbstractLimaService implements AccountReportService { + + protected static final String TITLE = "COMPTE"; + + @EJB + protected IdentityService identityService; + @EJB + protected ReportService reportService; + + @Override + public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { + + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setFormatter(bigDecimalFormat); + + Identity identity = identityService.getIdentity(); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setCompanyName(companyName); + + // general info about balance report + documentReport.setTitle(TITLE); + documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); + documentReport.setFromDate(from); + documentReport.setToDate(to); + documentReport.setSubReport(accountsEntryJasperReport); + + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + + if (from != null && to != null && account != null) { + + Collection<AccountEntry> accountEntries = new ArrayList<>(); + + ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); + List<Entry> entries = results.getListEntry(); + + if (CollectionUtils.isNotEmpty(entries)) { + for (Entry entry : entries) { + + if (entry.getAmount() == null || BigDecimal.ZERO.equals(entry.getAmount())) { + continue; + } + + String entryAccountNumber = entry.getAccount().getAccountNumber(); + String code = ""; + if (entry.getFinancialTransaction().getEntryBook() != null) { + code = entry.getFinancialTransaction().getEntryBook().getCode(); + } + + AccountEntry accountEntry = new AccountEntryImpl(); + accountEntry.setAccountNumber(entryAccountNumber); + accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); + accountEntry.setCode(code); + accountEntry.setVoucher(entry.getVoucher()); + accountEntry.setDescription(entry.getDescription()); + accountEntry.setLettering(entry.getLettering()); + accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); + accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); + accountEntry.setFormatter(bigDecimalFormat); + accountEntries.add(accountEntry); + } + } + + documentReport.addAllAccounts(accountEntries); + + } else { + if (log.isWarnEnabled()) { + log.warn("No account present"); + } + } + + return documentReport; + } +} diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 2b9a7e5..659fb03 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java b/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java index cbc142d..6dafd4c 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java +++ b/lima-report/src/main/java/org/chorem/lima/report/DocumentReportTypes.java @@ -28,6 +28,7 @@ package org.chorem.lima.report; */ public enum DocumentReportTypes { ACCOUNT, + ACCOUNT_ENTRY, BALANCE, BALANCE_MAIN_ACCOUNTS, BALANCE_SUB_ACCOUNTS, diff --git a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java index bfb438f..00b00b8 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java +++ b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java @@ -146,56 +146,59 @@ public class LimaReportConfig { } public URL getReportModelUrl(DocumentReportTypes documentType) { - URL mainReportBuilderPath = null; + URL jasperSourceFileUrl = null; switch (documentType) { case ACCOUNT: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); + break; + case ACCOUNT_ENTRY: + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ACCOUNT_ENTRY_REPORT_MODEL_PATH.getKey()); break; case BALANCE: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_DOCUMENT_REPORT_MODEL_PATH.key); break; case BALANCE_MAIN_ACCOUNTS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_ACCOUNT_REPORT_MODEL_PATH.key); break; case BALANCE_SUB_ACCOUNTS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.BALANCE_SUB_ACCOUNT_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_ENTRY_BOOK_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_FINANCIAL_PERIODS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_FINANCIAL_PERIOD_REPORT_MODEL_PATH.key); break; case ENTRY_BOOKS_TRANSACTION: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.ENTRY_BOOK_TRANSACTION_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_DOCUMENT_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK_GENERAL_ENTRY_BOOKS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_REPORT_MODEL_PATH.key); break; case GENERAL_ENTRY_BOOK_ENTRIES: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_ENTRY_BOOK_ENTRY_REPORT_MODEL_PATH.key); break; case LEDGER: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH.key); break; case LEDGER_GENERAL_LEDGERS: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_MODEL_PATH.key); break; case LEDGER_ENTRIES: - mainReportBuilderPath = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_ENTRY_MODEL_PATH.key); + jasperSourceFileUrl = getReportModelUrl(ReportConfigOption.GENERAL_LEDGER_ENTRY_MODEL_PATH.key); break; } - return mainReportBuilderPath; + return jasperSourceFileUrl; } public void setBalanceDocumentReportModelPath(String path) { @@ -334,7 +337,8 @@ public class LimaReportConfig { REPORTS_MODEL_DIR("lima.reports.dir",n("lima.config.reports.dir.description"),"${lima.data.dir}/reports", File.class, false, false), - ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", n("lima.config.documentReport.account.documentReportModelPath.description"), "/jasperreports/accounts/DocumentReport.jrxml",String.class, false, false), + ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", n("lima.config.documentReport.account.documentReportModelPath.description"), "/jasperreports/account/DocumentReport.jrxml",String.class, false, false), + ACCOUNT_ENTRY_REPORT_MODEL_PATH("lima.config.documentReport.account.accountEntryReportModelPath", n("lima.config.documentReport.account.accountEntryReportModelPath.description"), "/jasperreports/account/AccountEntry.jrxml",String.class, false, false), BALANCE_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.balance.documentReportModelPath", n("lima.config.documentReport.balance.documentReportModelPath.description"), "/jasperreports/balance/DocumentReport.jrxml", String.class, false, false), BALANCE_ACCOUNT_REPORT_MODEL_PATH("lima.config.documentReport.balance.balanceAccountReportModelPath", n("lima.config.documentReport.balance.balanceAccountReportModelPath.description"), "/jasperreports/balance/BalanceReportAccountReport.jrxml", String.class, false, false), diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index dea0e41..4821c7f 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -31,20 +31,18 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.FinancialStatementAmounts; -import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.OptionsService; -import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.report.AccountReportService; import org.chorem.lima.business.api.report.BalanceReportService; import org.chorem.lima.business.api.report.GeneralEntryBookReportService; import org.chorem.lima.business.api.report.LedgerReportService; import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; import org.chorem.lima.business.utils.BigDecimalToString; import org.chorem.lima.entity.Account; -import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.Identity; import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; @@ -56,7 +54,6 @@ import java.io.InputStream; import java.math.BigDecimal; import java.net.URL; import java.text.DecimalFormat; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -72,7 +69,7 @@ public class DocumentService { private FinancialStatementService financialStatementService; - private ReportService reportService; + protected AccountReportService accountReportService; protected BalanceReportService balanceReportService; @@ -86,6 +83,7 @@ public class DocumentService { protected JasperReports jasperReports; + protected String accountFilePath; protected String balanceFilePath; protected String generalEntryBookReportPdfFilePath; protected String entryBooksReportPdfFilePath; @@ -94,9 +92,9 @@ public class DocumentService { public DocumentService() { identityService = LimaServiceFactory.getService(IdentityService.class); financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); - reportService = LimaServiceFactory.getService(ReportService.class); accountService = LimaServiceFactory.getService(AccountService.class); + accountReportService = LimaServiceFactory.getService(AccountReportService.class); balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); @@ -116,6 +114,7 @@ public class DocumentService { String reportDirPath = reportDir.getAbsolutePath(); + accountFilePath = reportDirPath + File.separator + DocumentsEnum.ACCOUNT.getFileName() + ".pdf"; balanceFilePath = reportDirPath + File.separator + DocumentsEnum.BALANCE.getFileName() + ".pdf"; generalEntryBookReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.GENERAL_ENTRY_BOOK.getFileName() + ".pdf"; entryBooksReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.ENTRY_BOOKS.getFileName() + ".pdf"; @@ -338,80 +337,6 @@ public class DocumentService { // } - public String createAccountDocument(Date beginDate, Date endDate, String account) { - - String accountReport; - - try { - - Account accountFormat = accountService.findAccountById(account); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); - - accountReport = constructHtmlHeader(t("lima.reports.accounts")); - - ReportsDatas results; - - if (beginDate != null && endDate != null && accountFormat != null) { - - String subTitleFirstpart = t("lima.fiscalperiod.fiscalperiod") + " : " + simpleDateFormat.format(beginDate) + " - " + simpleDateFormat.format(endDate); - String subTitleSecPart = t("lima.financialtransaction.account") + " : " + accountFormat.getAccountNumber() + " - " + accountFormat.getLabel(); - accountReport += constructSubTitleHtml(subTitleFirstpart, subTitleSecPart); - - results = reportService.generateAccountsReports(accountFormat, true, - beginDate, endDate); - List<Entry> entries = results.getListEntry(); - - String[] columnNames = {t("lima.table.number"), t("lima.table.date"), t("lima.table.entryBook"), - t("lima.table.voucher"), t("lima.table.description"), t("lima.table.letter"), - t("lima.table.debit"), t("lima.table.credit")}; - - accountReport += "\t<table border=\"1\" width=\"100%\" cellpadding=\"3\" cellspacing=\"0\">\n"; - - accountReport += constructTableHeader(columnNames); - accountReport += "\t\t<tbody>\n"; - - boolean even = true; - for (Entry entry : entries) { - - String accountNumber = entry.getAccount().getAccountNumber(); - String transactionDate = simpleDateFormat.format(entry.getFinancialTransaction().getTransactionDate()); - String code = ""; - if (entry.getFinancialTransaction().getEntryBook() != null) { - code = entry.getFinancialTransaction().getEntryBook().getCode(); - } - String voucher = entry.getVoucher(); - String description = entry.getDescription(); - String lettering = entry.getLettering(); - - - String[] columnData = {(StringUtils.isBlank(accountNumber) ? "" : accountNumber), (StringUtils.isBlank(transactionDate) ? "" : transactionDate), - (StringUtils.isBlank(code) ? "" : code), (StringUtils.isBlank(voucher) ? "" : voucher), - (StringUtils.isBlank(description) ? "" : description), (StringUtils.isBlank(lettering) ? "" : lettering), - (entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO).toString(), - (entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()).toString()}; - - accountReport += constructTableLine(columnData, even); - even = !even; - } - - accountReport += "\t\t</tbody>\n\t</table>\n" + - "</body>\n"; - - } else { - if (log.isWarnEnabled()) { - log.warn("No account present"); - } - } - - accountReport += "</html>"; - - } catch (Exception e) { - throw new LimaTechnicalException("Can't create document", e); - } - - return accountReport; - } - protected String constructHtmlHeader(String title) { String head = "<!DOCTYPE html>\n" + "<html>\n" + @@ -543,6 +468,14 @@ public class DocumentService { return result; } + //############## account ############## + public void createAccountDocument(String account, Date beginDate, Date endDate) { + JasperReport acountEntryReport = jasperReports.getAccountEntryReport(); + DocumentReport report = accountReportService.getAccountDocumentReport(account, beginDate, endDate, acountEntryReport, getDecimalFormat()); + jasperReports.generatePDFReport(DocumentsEnum.ACCOUNT, accountFilePath, Lists.newArrayList(report)); + } + + //############## balance ############## public void createBalanceDocuments(Date beginDate, Date endDate, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); @@ -601,7 +534,7 @@ public class DocumentService { createBalanceDocuments(beginDate, endDate, null); break; case ACCOUNT: - stringResult = createAccountDocument(beginDate, endDate, account); + createAccountDocument(account, beginDate, endDate); break; case ENTRY_BOOKS: createEntryBooksDocuments(beginDate, endDate, null); diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java b/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java index 7674e09..2a1242d 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/JasperReports.java @@ -52,6 +52,9 @@ public class JasperReports { private static final Log log = LogFactory.getLog(JasperReports.class); + protected JasperReport accountDocumentReport; + protected JasperReport accountEntryReport; + protected JasperReport balanceDocumentReport; protected JasperReport balanceManAccountsReport; protected JasperReport balanceSubAccountsReport; @@ -79,6 +82,9 @@ public class JasperReports { LimaReportConfig config = LimaReportConfig.getInstance(); // compile phase + accountDocumentReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.ACCOUNT)); + accountEntryReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.ACCOUNT_ENTRY)); + balanceDocumentReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE)); balanceManAccountsReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE_MAIN_ACCOUNTS)); balanceSubAccountsReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.BALANCE_SUB_ACCOUNTS)); @@ -97,6 +103,7 @@ public class JasperReports { generalLedgerEntriesReport = prepareJasperReport(config.getReportModelUrl(DocumentReportTypes.LEDGER_ENTRIES)); reportsByDocumentType = Maps.newHashMap(); + reportsByDocumentType.put(DocumentsEnum.ACCOUNT, accountDocumentReport); reportsByDocumentType.put(DocumentsEnum.BALANCE, balanceDocumentReport); reportsByDocumentType.put(DocumentsEnum.GENERAL_ENTRY_BOOK, generalEntryBookDocumentReport); reportsByDocumentType.put(DocumentsEnum.ENTRY_BOOKS, entryBookDocumentReport); @@ -139,6 +146,9 @@ public class JasperReports { } + public JasperReport getAccountEntryReport() { + return accountEntryReport; + } public JasperReport getBalanceManAccountsReport() { return balanceManAccountsReport; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 03e84c68bbffd4caeefa3c9d4dbd43721789d942 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:53:48 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper --- .../jasperreports/account/AccountEntry.jrxml | 247 ++++++++++++++++++ .../jasperreports/account/DocumentReport.jrxml | 288 +++++++++++++++++++++ 2 files changed, 535 insertions(+) diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml new file mode 100644 index 0000000..319105e --- /dev/null +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-06-27T00:41:06 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="31" whenNoDataType="BlankPage" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenResourceMissingType="Empty" isIgnorePagination="true" uuid="75ff [...] + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> + <style name="Default" isDefault="true" fontName="DejaVu Sans"/> + <style name="Default oblique" fontName="DejaVu Sans Mono"/> + <field name="accountNumber" class="java.lang.String"/> + <field name="transactionDate" class="java.util.Date"/> + <field name="code" class="java.lang.String"/> + <field name="voucher" class="java.lang.String"/> + <field name="description" class="java.lang.String"/> + <field name="lettering" class="java.lang.String"/> + <field name="debit" class="java.math.BigDecimal"/> + <field name="credit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <variable name="subTotalCredit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{credit}]]></variableExpression> + <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <property name="com.jaspersoft.studio.unit.height" value="pixel"/> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="84" height="10" uuid="3df46955-605d-424c-a464-3096d7e231f4"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="84" y="0" width="62" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{transactionDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="146" y="0" width="36" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{code}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="182" y="0" width="108" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="0" width="108" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="398" y="0" width="36" height="10" uuid="961e8048-c6ef-4b58-a857-31f9f29406c8"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"> + <font size="8" isBold="false"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{lettering}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{credit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{credit}) : ""]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="10"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <frame> + <reportElement x="0" y="0" width="578" height="10" uuid="5863f40f-6423-4463-ad4a-c4cecab0323c"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + </textField> + <textField> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <font size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{subTotalCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalCredit}) : ""]]></textFieldExpression> + </textField> + <textField> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + </reportElement> + <textElement textAlignment="Right"> + <font size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($V{subTotalDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalDebit}) : ""]]></textFieldExpression> + </textField> + </frame> + </band> + </columnFooter> +</jasperReport> diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml new file mode 100644 index 0000000..6b60042 --- /dev/null +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -0,0 +1,288 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-06-27T00:11:53 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> + <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="fromDate" class="java.util.Date"/> + <field name="toDate" class="java.util.Date"/> + <field name="currency" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="companyName" class="java.lang.String"/> + <field name="title" class="java.lang.String"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> + </variable> + <group name="accounts"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="41" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{title}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> + <reportElement style="Default" x="444" y="0" width="134" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph rightIndent="5"/> + </textElement> + <textFieldExpression><![CDATA["Edition du: " + new SimpleDateFormat("dd/MM/yyyy à HH:mm").format(new java.util.Date())]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="80" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA["Du " + new SimpleDateFormat("dd/MM/yyyy").format($F{fromDate})]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="20" width="80" height="20" forecolor="#736343" uuid="5fc4df4a-5930-4ccd-b450-cf7aac6be57b"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[" au " + new SimpleDateFormat("dd/MM/yyyy").format($F{toDate})]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="10" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="45" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="9" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> + </textField> + </band> + </pageHeader> + <columnHeader> + <band height="20"> + <frame> + <reportElement style="Column header" mode="Opaque" x="0" y="0" width="578" height="20" backcolor="#FDCA97" uuid="6c2c2b44-eebf-41d3-8b56-47d4a20a4b24"> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <staticText> + <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="84" height="20" forecolor="#804000" backcolor="#FFFFFF" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[N° Compte]]></text> + </staticText> + <staticText> + <reportElement x="84" y="0" width="62" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Date]]></text> + </staticText> + <staticText> + <reportElement x="146" y="0" width="36" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Journal]]></text> + </staticText> + <staticText> + <reportElement x="182" y="0" width="108" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Pièce comptable]]></text> + </staticText> + <staticText> + <reportElement x="290" y="0" width="108" height="20" forecolor="#804000" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Description]]></text> + </staticText> + <staticText> + <reportElement x="398" y="0" width="36" height="20" forecolor="#804000" uuid="f0c1ae81-733f-42ba-844d-082b51c95040"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitx" value="pixel"/> + <property name="com.jaspersoft.studio.unit.x" value="px"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Lettre]]></text> + </staticText> + <staticText> + <reportElement x="434" y="0" width="72" height="20" forecolor="#804000" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineWidth="0.6" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement x="506" y="0" width="72" height="20" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <box> + <topPen lineColor="#804000"/> + <leftPen lineColor="#804000"/> + <bottomPen lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="20" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> + </subreport> + </band> + </detail> + <pageFooter> + <band height="10" splitType="Stretch"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="0" width="288" height="10" uuid="7efdc24b-643b-4927-89e5-30edca53124f"/> + <textElement textAlignment="Right"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement x="288" y="0" width="287" height="10" uuid="78cfa3db-28e7-420e-b2e4-441f37387159"/> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </pageFooter> +</jasperReport> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 4c16fcbfa4fd587e9a5cbfcce97a5ece73ed0864 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 10:14:15 2015 +0200 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné --- .../org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 8251a9a..aa08a2c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -72,7 +72,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc if (CollectionUtils.isNotEmpty(entries)) { for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.equals(entry.getAmount())) { + if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { continue; } -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit e9c81264aac8c378b8df4146415b17e623c6d065 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 12:05:27 2015 +0200 refs #1241 modification de l'affichage des infos --- .../ejb/report/AccountReportServiceImpl.java | 12 ++++- .../jasperreports/account/AccountEntry.jrxml | 52 +++++++++++----------- .../jasperreports/account/DocumentReport.jrxml | 30 +++++++++---- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index aa08a2c..d43dd90 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -63,6 +63,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); if (from != null && to != null && account != null) { + String fromAccountLabel = account.getAccountNumber(); Collection<AccountEntry> accountEntries = new ArrayList<>(); @@ -71,7 +72,6 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc if (CollectionUtils.isNotEmpty(entries)) { for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { continue; } @@ -98,6 +98,16 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); + if (CollectionUtils.isEmpty(accountEntries)) { + fromAccountLabel += ", aucune entrée trouvé sur ce compte"; + } else if (accountEntries.size() == 1){ + fromAccountLabel += ", et son compte fils"; + } else { + fromAccountLabel += ", et ses comptes fils"; + } + + documentReport.setFromAccount(fromAccountLabel); + } else { if (log.isWarnEnabled()) { log.warn("No account present"); diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml index 319105e..e46f3df 100644 --- a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-27T00:41:06 --> +<!-- 2015-06-29T11:10:52 --> <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"/> @@ -42,9 +42,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -59,15 +59,15 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> <paragraph lineSpacingSize="0.0" leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{transactionDate}]]></textFieldExpression> + <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy à HH:mm").format($F{transactionDate})]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="146" y="0" width="36" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> @@ -79,9 +79,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -98,13 +98,13 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> + <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> + <paragraph lineSpacingSize="0.0" leftIndent="2" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[$F{voucher}]]></textFieldExpression> </textField> @@ -117,13 +117,13 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> + <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="false"/> - <paragraph lineSpacingSize="0.0" rightIndent="2"/> + <paragraph lineSpacingSize="0.0" leftIndent="2" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression> </textField> @@ -138,9 +138,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> <font size="8" isBold="false"/> @@ -155,9 +155,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -172,9 +172,9 @@ </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen 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.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8" isBold="false"/> @@ -194,10 +194,10 @@ <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"/> + <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> <textField> <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml index 6b60042..f753198 100644 --- a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-27T00:11:53 --> +<!-- 2015-06-29T11:12:29 --> <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"/> @@ -11,16 +11,17 @@ <queryString> <![CDATA[]]> </queryString> - <field name="fromDate" class="java.util.Date"/> - <field name="toDate" class="java.util.Date"/> - <field name="currency" class="java.lang.String"/> <field name="accounts" class="java.util.List"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="currency" class="java.lang.String"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="fromAccount" class="java.lang.String"/> + <field name="fromDate" class="java.util.Date"/> + <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="soldeDebit" class="java.math.BigDecimal"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="title" class="java.lang.String"/> + <field name="toDate" class="java.util.Date"/> <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> @@ -90,7 +91,7 @@ </band> </title> <pageHeader> - <band height="45" splitType="Stretch"> + <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"/> @@ -101,6 +102,17 @@ </textElement> <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="5b52edd4-5983-4e67-8b3f-9e89cfe43818"> + <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> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit ce734ffebd6f09260dd5f220a56d109ba17ef245 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 1 17:42:23 2015 +0200 refs #1241 factorisation du code source Jasper, utilisation de style --- .../jasperreports/balance/DocumentReport.jrxml | 87 +++++++--------------- 1 file changed, 25 insertions(+), 62 deletions(-) diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index 251d1e4..a4bbb30 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -1,13 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T11:48:55 --> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-07-01T15:11: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="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> - <style name="Bold" fontName="DejaVuSans-Bold" fontSize="8"/> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColomn" forecolor="#804000" fontName="DejaVuSans-Bold" fontSize="8" isBold="true"> + <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> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> <queryString> <![CDATA[]]> </queryString> @@ -66,8 +73,6 @@ <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"/> @@ -89,9 +94,9 @@ </band> </title> <pageHeader> - <band height="25" splitType="Stretch"> + <band height="16" splitType="Stretch"> <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="9" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> + <reportElement style="Oblique" x="0" y="0" 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"/> @@ -102,7 +107,7 @@ <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"> + <reportElement style="Oblique" x="444" y="0" 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> @@ -116,124 +121,82 @@ <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"> + <reportElement style="TableHeader" x="0" y="0" width="578" height="20" 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"> + <reportElement style="HeaderColomn" x="0" y="0" width="40" height="20" 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"> + <reportElement style="HeaderColomn" x="40" y="0" width="250" height="20" 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"> + <reportElement style="HeaderColomn" x="290" y="0" width="144" height="10" 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"> + <reportElement style="HeaderColomn" x="290" y="10" width="72" height="10" 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"> + <reportElement style="HeaderColomn" x="362" y="10" width="72" height="10" 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"> + <reportElement style="HeaderColomn" x="434" y="0" width="144" height="10" 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"> + <reportElement style="HeaderColomn" x="434" y="10" width="72" height="10" 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"> + <reportElement style="HeaderColomn" x="506" y="10" width="72" height="10" 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> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 643e3a559e055debe3110b43c172ba111342d10b Author: dcosse <cosse@codelutin.com> Date: Thu Jul 2 15:08:14 2015 +0200 refs #1241 correction sur nom de police --- .../src/main/resources/jasperreports/balance/DocumentReport.jrxml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index a4bbb30..4cef030 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-07-01T15:11:39 --> +<!-- 2015-07-02T15:06: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"/> <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> - <style name="HeaderColomn" forecolor="#804000" fontName="DejaVuSans-Bold" fontSize="8" isBold="true"> + <style name="HeaderColomn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> <box> <topPen lineWidth="0.6" lineColor="#804000"/> <leftPen lineWidth="0.6" lineColor="#804000"/> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 9afd18d63faa9b966fc50beda3e2573cc7fd47b3 Author: dcosse <cosse@codelutin.com> Date: Fri Jul 3 18:24:09 2015 +0200 refs #1241 refactoring --- .../lima/business/ejb/AbstractLimaService.java | 5 + .../ejb/report/AccountReportServiceImpl.java | 54 ++-- .../ejb/report/BalanceReportServiceImpl.java | 73 +++-- .../report/GeneralEntryBookReportServiceImpl.java | 25 +- .../ejb/report/LedgerReportServiceImpl.java | 25 +- .../ProvisionalEntryBookReportServiceImpl.java | 25 +- .../resources/i18n/lima-business_en_GB.properties | 32 +- .../resources/i18n/lima-business_fr_FR.properties | 30 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57764 -> 58818 bytes .../jasperreports/account/DocumentReport.jrxml | 350 ++++++++------------- .../balance/BalanceSubAccountsReport.jrxml | 10 +- .../jasperreports/balance/DocumentReport.jrxml | 165 ++++------ .../jasperreports/entryBook/DocumentReport.jrxml | 296 ++++++----------- .../resources/i18n/lima-swing_en_GB.properties | 17 +- .../resources/i18n/lima-swing_fr_FR.properties | 22 +- 15 files changed, 488 insertions(+), 641 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java index bedb0a5..2cb10ea 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java @@ -27,6 +27,8 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaInterceptor; import org.chorem.lima.entity.LimaCallaoTopiaDaoSupplier; +import java.text.SimpleDateFormat; + /** * Abstract code for all ejb services (get context, catch, finally...). * @@ -35,6 +37,9 @@ import org.chorem.lima.entity.LimaCallaoTopiaDaoSupplier; */ public abstract class AbstractLimaService { + public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); + public static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm"); + /** Logger. */ protected static final Log log = LogFactory.getLog(AbstractLimaService.class); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index d43dd90..5c4a88a 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -27,6 +27,8 @@ import java.util.Collection; import java.util.Date; import java.util.List; +import static org.nuiton.i18n.I18n.t; + /** * Created by davidcosse on 26/06/15. */ @@ -44,26 +46,22 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc @Override public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { + DocumentReport documentReport = getDocumentReport(from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); - DocumentReport documentReport = new DocumentReportImpl(); - documentReport.setFormatter(bigDecimalFormat); - - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setCompanyName(companyName); - - // general info about balance report - documentReport.setTitle(TITLE); - documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - documentReport.setFromDate(from); - documentReport.setToDate(to); - documentReport.setSubReport(accountsEntryJasperReport); + documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); + documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); + documentReport.setColumnLetterTitle(t("lima.config.documentReport.columnLetterTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); if (from != null && to != null && account != null) { - String fromAccountLabel = account.getAccountNumber(); + String selectedAccounts = account.getAccountNumber(); Collection<AccountEntry> accountEntries = new ArrayList<>(); @@ -99,14 +97,14 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); if (CollectionUtils.isEmpty(accountEntries)) { - fromAccountLabel += ", aucune entrée trouvé sur ce compte"; + selectedAccounts += ", aucune entrée trouvé sur ce compte"; } else if (accountEntries.size() == 1){ - fromAccountLabel += ", et son compte fils"; + selectedAccounts += ", et son compte fils"; } else { - fromAccountLabel += ", et ses comptes fils"; + selectedAccounts += ", et ses comptes fils"; } - documentReport.setFromAccount(fromAccountLabel); + documentReport.setHeaderSelectedAccounts(selectedAccounts); } else { if (log.isWarnEnabled()) { @@ -116,4 +114,24 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc return documentReport; } + + protected static DocumentReport getDocumentReport(Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { + Date currentDate = new Date(); + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setSubReport(subReport); + documentReport.setFormatter(bigDecimalFormat); + + documentReport.setTitleReport(TITLE); + + Identity identity = identityService.getIdentity(); + String companyName = identity == null ? "" : identity.getName(); + documentReport.setTitleCompanyName(companyName); + documentReport.setTitleCurrentDate(t("lima.config.documentReport.titleCurrentDate", DATE_FORMAT.format(currentDate), TIME_FORMAT.format(currentDate))); + documentReport.setTitleFromToDate(t("lima.config.documentReport.titleFromToDate", DATE_FORMAT.format(from), DATE_FORMAT.format(to))); + + documentReport.setHeaderSelectedAccountsLabel(t("lima.config.documentReport.headerSelectedAccountsLabel")); + documentReport.setHeaderCurrencyLabel(t("lima.config.documentReport.headerCurrencyLabel")); + documentReport.setHeaderCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); + return documentReport; + } } 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 f4ecd08..7a24de4 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 @@ -25,13 +25,13 @@ package org.chorem.lima.business.ejb.report; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import net.sf.jasperreports.engine.JasperReport; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.chorem.lima.beans.DocumentReport; 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; +import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialPeriodService; @@ -42,7 +42,6 @@ import org.chorem.lima.business.utils.AccountComparator; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.EntryTopiaDao; -import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; @@ -57,6 +56,8 @@ import java.util.Date; import java.util.HashMap; import java.util.List; +import static org.nuiton.i18n.I18n.t; + /** * Created by davidcosse on 04/11/14. */ @@ -93,19 +94,14 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - DocumentReport documentReport = new DocumentReportImpl(); - documentReport.setFormatter(bigDecimalFormat); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setCompanyName(companyName); - - // general info about balance report - documentReport.setTitle(TITLE); - documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - documentReport.setFromDate(from); - documentReport.setToDate(to); - documentReport.setSubReport(mainAccountsJasperReport); + documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); + documentReport.setColumnBalanceForPeriodTitle(t("lima.config.documentReport.columnBalanceForPeriodTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -116,43 +112,36 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal List<Account> accounts; //Remove Spaces - // TODO DCossé 12/06/14 selectedAccounts is allways NULL selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts); - //if no filter account - if (selectedAccounts == null || selectedAccounts.equals("")) { + + // find all if none specified + if (StringUtils.isBlank(selectedAccounts)) { accounts = accountTopiaDao.findAll(); - } - //build list account from selectedAccounts - else { + } else { accounts = accountService.stringToListAccounts(selectedAccounts); } Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); - if (accounts != null && !accounts.isEmpty()) { + if (CollectionUtils.isNotEmpty(accounts)) { Collections.sort(accounts, new AccountComparator()); - Account fromAccount = accounts.get(0); - 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(); - documentReport.setFromAccount(fromAccountLabel + " à " + toAccountLabel); + setDocumentReportHeaderSelectedAccounts(documentReport, accounts); HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - BalanceAccountImpl classAccount = accountsByClasses.get(accountClass); - if (classAccount == null) { - classAccount = new BalanceAccountImpl(); - classAccount.setFormatter(bigDecimalFormat); - classAccount.setSubReport(subAccountsJasperReport); - classAccount.setSubAccounts(new ArrayList<BalanceAccount>()); - classAccount.setAccountNumber(""); - accountsByClasses.put(accountClass, classAccount); - returnedAccounts.add(classAccount); + BalanceAccountImpl accountSubAccounts = accountsByClasses.get(accountClass); + if (accountSubAccounts == null) { + accountSubAccounts = new BalanceAccountImpl(); + accountSubAccounts.setFormatter(bigDecimalFormat); + accountSubAccounts.setSubReport(subAccountsJasperReport); + accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); + accountsByClasses.put(accountClass, accountSubAccounts); + returnedAccounts.add(accountSubAccounts); } BalanceAccount subClassAccount = bindAccountToBalanceReportAccount(accountClass, account, from, to, bigDecimalFormat); - classAccount.addSubAccount(subClassAccount); + accountSubAccounts.addSubAccount(subClassAccount); } } @@ -161,6 +150,14 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal return documentReport; } + protected void setDocumentReportHeaderSelectedAccounts(DocumentReport documentReport, List<Account> accounts) { + Account fromAccount = accounts.get(0); + Account toAccount = accounts.get(accounts.size()-1); + String fromAccountText = StringUtils.isNotBlank(fromAccount.getLabel()) ? fromAccount.getLabel() + " (" + fromAccount.getAccountNumber() + ")" : fromAccount.getAccountNumber(); + String toAccountText = StringUtils.isNotBlank(toAccount.getLabel()) ? toAccount.getLabel() + " (" + toAccount.getAccountNumber() + ")" : toAccount.getAccountNumber(); + documentReport.setHeaderSelectedAccounts(t("lima.config.documentReport.headerSelectedAccounts", fromAccountText, toAccountText)); + } + /** * Calculate all credit, debit and solde amounts for the balance * <p/> @@ -176,6 +173,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); balanceAccount.setAccountNumber(accountNumber); balanceAccount.setLabel(account.getLabel()); + balanceAccount.setSubTotalForLabel(t("lima.config.documentReport.subTotalFor")); + balanceAccount.setTotalForLabel(t("lima.config.documentReport.totalFor")); EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); 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 9615820..ec77f90 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 @@ -31,7 +31,6 @@ 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.beans.DocumentReportImpl; import org.chorem.lima.beans.GeneralEntryBook; import org.chorem.lima.beans.GeneralEntryBookEntry; import org.chorem.lima.beans.GeneralEntryBookEntryImpl; @@ -44,7 +43,6 @@ import org.chorem.lima.business.api.report.GeneralEntryBookReportService; import org.chorem.lima.business.ejb.AbstractLimaService; import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; @@ -57,6 +55,8 @@ import java.util.Date; import java.util.List; import java.util.Map; +import static org.nuiton.i18n.I18n.t; + /** * Created by davidcosse on 17/11/14. @@ -96,21 +96,16 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @Override public DocumentReport getGeneralEntryBookDocumentReport(Date beginDate, Date endDate, DecimalFormat bigDecimalFormat, JasperReport generalEntryBooksJasperReport, JasperReport entriesJasperReport) { - DocumentReport documentReport = new DocumentReportImpl(); - try { + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); + documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + + try { if (beginDate != null && endDate != null) { - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setCompanyName(companyName); - - // general infos about balance report - documentReport.setTitle(TITLE); - documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - documentReport.setFromDate(beginDate); - documentReport.setToDate(endDate); - documentReport.setSubReport(generalEntryBooksJasperReport); - documentReport.setFormatter(bigDecimalFormat); List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(beginDate, endDate); 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 56376df..50c5b17 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 @@ -26,7 +26,6 @@ import net.sf.jasperreports.engine.JasperReport; 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; @@ -40,7 +39,6 @@ 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; @@ -73,23 +71,20 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg @Override public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, DecimalFormat decimalFormat, JasperReport generalLedgersJasperReport, JasperReport entriesJasperReport) { - DocumentReport result = new DocumentReportImpl(); - result.setFormatter(decimalFormat); - result.setCurrency(decimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - result.setFromDate(beginDate); - result.setToDate(endDate); - result.setSubReport(generalLedgersJasperReport); - result.setTitle(TITLE); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - result.setCompanyName(companyName); + documentReport.setColumnDateTitle(t("lima.config.documentReport.setColumnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.setColumnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + documentReport.setColumnBalanceTitle(t("lima.config.documentReport.columnBalanceTitle")); if (beginDate != null && endDate != null) { try { BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); - result.setFromAccount(balanceTrial.getFromToAccountNumber()); + documentReport.setHeaderSelectedAccounts(balanceTrial.getFromToAccountNumber()); if (balanceTrial.getReportsDatas() != null) { for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { @@ -109,7 +104,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg generalLedger.setSolde(amountDebit.subtract(amountCredit)); generalLedger.setSubReport(entriesJasperReport); generalLedger.setNbEntries(balanceTrial.getReportsDatas().size()); - result.addGeneralLedgers(generalLedger); + documentReport.addGeneralLedgers(generalLedger); Collections.sort(entries, new EntryComparator()); @@ -150,6 +145,6 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg 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/ProvisionalEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java index 0340918..41d03a5 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 @@ -27,7 +27,6 @@ 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.beans.DocumentReportImpl; import org.chorem.lima.beans.EntryBookImpl; import org.chorem.lima.beans.FinancialPeriodImpl; import org.chorem.lima.beans.Transaction; @@ -42,7 +41,6 @@ import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; @@ -53,6 +51,8 @@ import java.text.DecimalFormat; import java.util.Date; import java.util.List; +import static org.nuiton.i18n.I18n.t; + /** * Created by davidcosse on 19/11/14. */ @@ -89,22 +89,17 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo @Override public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, DecimalFormat bigDecimalFormat, JasperReport entryBooksJasperReport, JasperReport financialPeriodsJasperReport, JasperReport transactionsJasperReport) { - DocumentReport documentReport = new DocumentReportImpl(); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); + + documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + try { if (beginDate != null && endDate != null) { - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setCompanyName(companyName); - - // general infos about balance report - documentReport.setTitle(TITLE); - documentReport.setCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - documentReport.setFromDate(beginDate); - documentReport.setToDate(endDate); - documentReport.setFormatter(bigDecimalFormat); - - documentReport.setSubReport(entryBooksJasperReport); BigDecimal documentReportDebit = BigDecimal.ZERO; BigDecimal documentReportCredit = BigDecimal.ZERO; 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 36aa5b4..f6f147a 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 @@ -56,9 +56,26 @@ lima.config.currency.label= lima.config.data.dir.description=Data directory of Lima lima.config.decimalSeparator.label= lima.config.documentReport.account.documentReportModelPath.description= +lima.config.documentReport.account.noAccount=Any account present +lima.config.documentReport.account.noAccountTitle=Any account present +lima.config.documentReport.assets=Assets +lima.config.documentReport.balance=Balance lima.config.documentReport.balance.balanceAccountReportModelPath.description= lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= lima.config.documentReport.balance.documentReportModelPath.description= +lima.config.documentReport.balanceSheet=Balance +lima.config.documentReport.columnAccountTitle=Account +lima.config.documentReport.columnBalanceForPeriodTitle=Balance +lima.config.documentReport.columnBalanceTitle=Balance +lima.config.documentReport.columnCreditTitle=Credit +lima.config.documentReport.columnDateTitle=Date +lima.config.documentReport.columnDebitTitle=Debit +lima.config.documentReport.columnDescriptionTitle=Label +lima.config.documentReport.columnEntryBookTitle=Entry book +lima.config.documentReport.columnLetterTitle=Letter +lima.config.documentReport.columnTotalForPeriodTitle=Total for period +lima.config.documentReport.columnVoucherTitle=Voucher +lima.config.documentReport.currentAsset=Current asset lima.config.documentReport.entrybook.documentReportModelPath.description= lima.config.documentReport.entrybook.entryBookModelPath.description= lima.config.documentReport.entrybook.financialPeriodModelPath.description= @@ -69,6 +86,17 @@ lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.descriptio lima.config.documentReport.generalLedger.documentReportModelPath.description= lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= lima.config.documentReport.generalLedger.generalLedgerModelPath.description= +lima.config.documentReport.headerCurrencyLabel=Currency\: +lima.config.documentReport.headerSelectedAccounts=%s to %s +lima.config.documentReport.headerSelectedAccountsLabel=Accounts\: +lima.config.documentReport.investments=Investments +lima.config.documentReport.liabilities=Liabilities +lima.config.documentReport.setColumnDateTitle= +lima.config.documentReport.setColumnEntryBookTitle= +lima.config.documentReport.subTotalFor=Sub total for\: +lima.config.documentReport.titleCurrentDate=Printed on %s at %s +lima.config.documentReport.titleFromToDate=From %s to %s +lima.config.documentReport.totalFor=total for\: lima.config.host.address.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= @@ -88,9 +116,7 @@ lima.host.http.address.description= lima.host.http.port.description= lima.importexport.import.alreadyExistFinancialStatement=Same financial statement exists lima.lettering.accountRegularization=Regulatory account -lima.reports.account.noAccount=Any account present -lima.reports.account.noAccountTitle=Any account present -lima.reports.accounts=Accounts +lima.report.fromDateToDate= lima.table.credit=Credit lima.table.date=Date lima.table.debit=Debit 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 10c9d44..d8d52a9 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 @@ -56,10 +56,26 @@ lima.config.data.dir.description=Répertoire des données de Lima lima.config.decimalSeparator.label= 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.assets=avoirs +lima.config.documentReport.balance=Solde 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.balanceSheet=Balance lima.config.documentReport.bigDecimalFormat=formattage des montants +lima.config.documentReport.columnAccountTitle=Compte +lima.config.documentReport.columnBalanceForPeriodTitle=Solde période +lima.config.documentReport.columnBalanceTitle=Solde +lima.config.documentReport.columnCreditTitle=Crédit +lima.config.documentReport.columnDateTitle=Date +lima.config.documentReport.columnDebitTitle=Débit +lima.config.documentReport.columnDescriptionTitle=Intitulé +lima.config.documentReport.columnEntryBookTitle=Journal +lima.config.documentReport.columnLetterTitle=Lettre +lima.config.documentReport.columnTotalForPeriodTitle=Total période +lima.config.documentReport.columnVoucherTitle=Pièce comptable +lima.config.documentReport.currentAsset=Actif à court terme +lima.config.documentReport.dir.description=Dossier des rapports 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' @@ -72,9 +88,19 @@ lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.descriptio lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' 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.documentReport.headerCurrencyLabel=Devise\: +lima.config.documentReport.headerSelectedAccounts=%s à %s +lima.config.documentReport.headerSelectedAccountsLabel=Comptes\: +lima.config.documentReport.investments=investissements +lima.config.documentReport.liabilities=passif +lima.config.documentReport.setColumnDateTitle= +lima.config.documentReport.setColumnEntryBookTitle= +lima.config.documentReport.subTotalFor=Sous total pour\: +lima.config.documentReport.titleCurrentDate=Édition du %s à %s +lima.config.documentReport.titleFromToDate=Du %s au %s +lima.config.documentReport.totalFor=total pour\: lima.config.host.address.description=Adresse du serveur LIMA lima.config.host.http.port.description=Port HTTP -lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport lima.config.rulesnationality.description=Règles nationales lima.config.scale.description=Précision @@ -90,8 +116,8 @@ lima.host.http.address.description= lima.host.http.port.description=Port du serveur web de Lima lima.importexport.import.alreadyExistFinancialStatement=Transaction financière exitante lima.lettering.accountRegularization=Compte de régulation +lima.report.fromDateToDate= lima.reports.account.noAccount=Aucun compte présent -lima.reports.accounts=Comptes lima.table.credit=Credit lima.table.date=Date lima.table.debit=Débit diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 659fb03..5e7eea2 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml index f753198..71d897f 100644 --- a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -4,24 +4,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="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> - <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> - <queryString> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <queryString> <![CDATA[]]> </queryString> - <field name="accounts" class="java.util.List"/> - <field name="companyName" class="java.lang.String"/> - <field name="currency" class="java.lang.String"/> - <field name="formatter" class="java.text.DecimalFormat"/> - <field name="fromAccount" class="java.lang.String"/> - <field name="fromDate" class="java.util.Date"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="title" class="java.lang.String"/> - <field name="toDate" class="java.util.Date"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="accounts" class="java.util.List"/> + + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> + + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + + <field name="columnAccountTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDateTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnEntryBookTitle" class="java.lang.String"/> + <field name="columnLetterTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" 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> @@ -29,241 +47,129 @@ <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="5b52edd4-5983-4e67-8b3f-9e89cfe43818"> - <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> + <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{titleReport}]]></textFieldExpression> + </textField> + <textField 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[$F{titleCurrentDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="10" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="16" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></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"> + <reportElement style="TableHeader" x="0" y="0" width="578" height="20" uuid="6c2c2b44-eebf-41d3-8b56-47d4a20a4b24"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> </reportElement> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> - <staticText> - <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="84" height="20" forecolor="#804000" backcolor="#FFFFFF" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <rightPen lineWidth="0.6"/> - </box> + <textField> + <reportElement style="HeaderColumn" x="0" y="0" width="84" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[N° Compte]]></text> - </staticText> - <staticText> - <reportElement x="84" y="0" width="62" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> + <textFieldExpression><![CDATA[$F{columnAccountTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="84" y="0" width="62" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Date]]></text> - </staticText> - <staticText> - <reportElement x="146" y="0" width="36" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> + <textFieldExpression><![CDATA[$F{columnDateTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="146" y="0" width="36" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Journal]]></text> - </staticText> - <staticText> - <reportElement x="182" y="0" width="108" height="20" forecolor="#804000" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> + <textFieldExpression><![CDATA[$F{columnEntryBookTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="182" y="0" width="108" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Pièce comptable]]></text> - </staticText> - <staticText> - <reportElement x="290" y="0" width="108" height="20" forecolor="#804000" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - </box> + <textFieldExpression><![CDATA[$F{columnVoucherTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="290" y="0" width="108" height="20" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Description]]></text> - </staticText> - <staticText> - <reportElement x="398" y="0" width="36" height="20" forecolor="#804000" uuid="f0c1ae81-733f-42ba-844d-082b51c95040"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> + <textFieldExpression><![CDATA[$F{columnDescriptionTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="398" y="0" width="36" height="20" uuid="f0c1ae81-733f-42ba-844d-082b51c95040"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Lettre]]></text> - </staticText> - <staticText> - <reportElement x="434" y="0" width="72" height="20" forecolor="#804000" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <topPen lineWidth="0.6" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> + <textFieldExpression><![CDATA[$F{columnLetterTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="0" width="72" height="20" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement x="506" y="0" width="72" height="20" forecolor="#804000" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <box> - <topPen lineColor="#804000"/> - <leftPen lineColor="#804000"/> - <bottomPen lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="506" y="0" width="72" height="20" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> </frame> </band> </columnHeader> diff --git a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml index 1e970a7..6214da6 100644 --- a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T12:07:20 --> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-07-02T18:03:10 --> <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"/> @@ -18,6 +18,8 @@ <field name="soldeCredit" class="java.math.BigDecimal"/> <field name="formatter" class="java.text.DecimalFormat"/> <field name="mainAccountLabel" class="java.lang.String"/> + <field name="totalForLabel" class="java.lang.String"/> + <field name="subTotalForLabel" class="java.lang.String"/> <variable name="amountDebitSolde" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{amountDebit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> @@ -158,7 +160,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Sous total pour " + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{subTotalForLabel} + $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"> @@ -285,7 +287,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Total pour " + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{totalForLabel} + $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"> diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index 4cef030..16754a9 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-07-02T15:06:04 --> +<!-- 2015-07-02T17:50:13 --> <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" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> - <style name="HeaderColomn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> <box> <topPen lineWidth="0.6" lineColor="#804000"/> <leftPen lineWidth="0.6" lineColor="#804000"/> @@ -18,15 +18,25 @@ <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="mainAccounts" class="java.util.List"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> + <field name="mainAccounts" class="java.util.List"/> + + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> + + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + + <field name="columnAccountTitle" class="java.lang.String"/> + <field name="columnBalanceForPeriodTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnTotalForPeriodTitle" class="java.lang.String"/> <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> @@ -49,46 +59,30 @@ <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{title}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleReport}]]></textFieldExpression> </textField> - <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> + <textField 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> + <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></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"/> - </reportElement> - <textElement verticalAlignment="Middle"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> <font isBold="true"/> </textElement> - <textFieldExpression><![CDATA[" au " + new SimpleDateFormat("dd/MM/yyyy").format($F{toDate})]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></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> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> <textElement verticalAlignment="Middle" rotation="None"> <font size="10" isBold="true"/> <paragraph leftIndent="5"/> </textElement> - <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> </textField> </frame> </band> @@ -96,25 +90,18 @@ <pageHeader> <band height="16" splitType="Stretch"> <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="0" 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> + <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isItalic="true"/> </textElement> - <textFieldExpression><![CDATA["Comptes: " + $F{fromAccount}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="444" y="0" 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> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8"/> </textElement> - <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></textFieldExpression> </textField> </band> </pageHeader> @@ -124,84 +111,62 @@ <reportElement style="TableHeader" x="0" y="0" width="578" height="20" uuid="6c2c2b44-eebf-41d3-8b56-47d4a20a4b24"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> </reportElement> - <staticText> - <reportElement style="HeaderColomn" x="0" y="0" width="40" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"> - <property name="local_mesure_unitwidth" value="pixel"/> - </reportElement> + <textField> + <reportElement style="HeaderColumn" x="0" y="0" width="40" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Compte]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="40" y="0" width="250" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"> - <property name="local_mesure_unitheight" value="pixel"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnAccountTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="40" y="0" width="250" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Intitulé]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="290" y="0" width="144" height="10" uuid="caadc464-ad77-4b53-b5cb-11e29c0a18ce"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnDescriptionTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="290" y="0" width="144" height="10" uuid="caadc464-ad77-4b53-b5cb-11e29c0a18ce"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Total Période]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="290" y="10" width="72" height="10" uuid="e6928f86-fe5c-4c14-996c-19728e6abf44"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnTotalForPeriodTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="290" y="10" width="72" height="10" uuid="e6928f86-fe5c-4c14-996c-19728e6abf44"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="362" y="10" width="72" height="10" uuid="13dd0f7b-3331-4ca4-8ef8-5468fb65fc3e"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="362" y="10" width="72" height="10" uuid="13dd0f7b-3331-4ca4-8ef8-5468fb65fc3e"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="434" y="0" width="144" height="10" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="0" width="144" height="10" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Solde Période]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="434" y="10" width="72" height="10" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnBalanceForPeriodTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="10" width="72" height="10" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement style="HeaderColomn" x="506" y="10" width="72" height="10" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="506" y="10" width="72" height="10" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> </frame> </band> </columnHeader> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml index 4b649cc..4e76999 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml @@ -1,26 +1,57 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T17:42:23 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T17:42:23 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> - <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <style name="FooterHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="FooterColumn" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> <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="entryBooks" class="java.util.List"/> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> + <field name="entryBooks" class="java.util.List"/> + + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> + + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + + <field name="columnAccountTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDateTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnTotalForPeriodTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" 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="entryBooks" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{entryBooks})]]></variableExpression> </variable> @@ -43,196 +74,100 @@ <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{title}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleReport}]]></textFieldExpression> </textField> - <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> + <textField 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> + <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></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"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> <font isBold="true"/> </textElement> - <textFieldExpression><![CDATA[" au " + new SimpleDateFormat("dd/MM/yyyy").format($F{toDate})]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></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> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> <textElement verticalAlignment="Middle" rotation="None"> <font size="10" isBold="true"/> <paragraph leftIndent="5"/> </textElement> - <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> </textField> </frame> </band> </title> <pageHeader> - <band height="25" splitType="Stretch"> + <band height="16" 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> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="8"/> </textElement> - <textFieldExpression><![CDATA["Devise: " + $F{currency}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></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"> + <reportElement style="TableHeader" x="0" y="0" width="578" height="20" 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> + <textField> + <reportElement style="HeaderColumn" x="0" y="0" width="60" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Date]]></text> - </staticText> - <staticText> - <reportElement x="60" y="0" width="100" 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> + <textFieldExpression><![CDATA[$F{columnDateTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="60" y="0" width="100" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[N° Compte]]></text> - </staticText> - <staticText> - <reportElement x="160" 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> + <textFieldExpression><![CDATA[$F{columnAccountTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="160" y="0" width="40" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Pièce]]></text> - </staticText> - <staticText> - <reportElement x="200" y="0" width="234" 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> + <textFieldExpression><![CDATA[$F{columnVoucherTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="200" y="0" width="234" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <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> + <textFieldExpression><![CDATA[$F{columnDescriptionTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="0" width="144" height="10" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889"/> <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> + <textFieldExpression><![CDATA[$F{columnTotalForPeriodTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="10" width="72" height="10" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"/> <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> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="506" y="10" width="72" height="10" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> </frame> </band> </columnHeader> @@ -271,34 +206,9 @@ <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <frame> - <reportElement style="Default" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"> - <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> + <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"/> <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="434" height="20" forecolor="#736343" uuid="f818f119-5580-46fd-acbd-086f7d222dde"> - <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> + <reportElement style="FooterColumn" x="0" y="0" width="434" height="20" forecolor="#736343" uuid="f818f119-5580-46fd-acbd-086f7d222dde"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="12" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> @@ -306,16 +216,7 @@ <textFieldExpression><![CDATA["Total pour les journaux sélectionnés"]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"> - <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> + <reportElement style="FooterColumn" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> @@ -323,16 +224,7 @@ <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"> - <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> + <reportElement style="FooterColumn" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> @@ -341,20 +233,14 @@ </textField> </frame> <textField isBlankWhenNull="false"> - <reportElement x="0" y="20" width="288" height="10" uuid="fd62df4f-6500-4fea-93be-fe749f161de6"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> + <reportElement x="0" y="20" width="288" height="10" uuid="fd62df4f-6500-4fea-93be-fe749f161de6"/> <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="e5018134-bbde-4b3e-a83d-7abf00c56c09"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> + <reportElement x="288" y="20" width="287" height="10" uuid="e5018134-bbde-4b3e-a83d-7abf00c56c09"/> <textElement textAlignment="Left"> <paragraph lineSpacingSize="0.0"/> </textElement> 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 a6a4484..4c6de4d 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 @@ -488,7 +488,22 @@ lima.quit=Exit lima.refresh=Refresh lima.refresh.shortcut=Refresh (F5) lima.remove=Remove -lima.remove.shortcut=Delete (Del) +lima.remove.shortcut= +lima.report.accounts=Accounts\: +lima.report.assets=Assets +lima.report.balance=Balance +lima.report.balanceForPeriod=Balance +lima.report.balanceSheet=Balance +lima.report.credit=Credit +lima.report.currency=Currency\: +lima.report.currentAsset=Current asset +lima.report.dedit=Debit +lima.report.fromDateToDate=From %s to %s +lima.report.generatingDate=Printed on %s +lima.report.investments=Investments +lima.report.label=Label +lima.report.liabilities=Liabilities +lima.report.totalForPeriod=Period total lima.retainedEarnings.wait= lima.search=Search lima.structure=Structure 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 d10862e..6440893 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 @@ -494,10 +494,24 @@ lima.preferences=Préférences lima.quit=Quitter lima.refresh=Actualiser lima.refresh.shortcut=Actualiser (F5) -lima.remove=Supprimer -lima.remove.shortcut=Supprimer (Suppr) -lima.retainedEarnings.wait=Report à nouveaux... -lima.search=Rechercher +lima.remove.shortcut= +lima.report.account=Compte +lima.report.accounts=Comptes\: +lima.report.assets=avoirs +lima.report.balance=Solde +lima.report.balanceForPeriod=Solde période +lima.report.balanceSheet=Balance +lima.report.credit=Crédit +lima.report.currency=Devise\: +lima.report.currentAsset=Actif à court terme +lima.report.dedit=Débit +lima.report.fromDateToDate=Du %s au %s +lima.report.generatingDate=Édition du %s +lima.report.investments=investissements +lima.report.label=Intitulé +lima.report.liabilities=passif +lima.report.totalForPeriod=Total période +lima.retainedEarnings.wait= lima.structure=Structure lima.table.account=Compte lima.table.balance=Solde -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit b01912625c723f6e6274b5453fc1fe6b0f708469 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 7 16:41:55 2015 +0200 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports --- .../chorem/lima/business/LimaBusinessConfig.java | 11 + .../ejb/report/AccountReportServiceImpl.java | 11 +- .../ejb/report/BalanceReportServiceImpl.java | 80 ++-- .../report/GeneralEntryBookReportServiceImpl.java | 20 +- .../ejb/report/LedgerReportServiceImpl.java | 17 +- .../ProvisionalEntryBookReportServiceImpl.java | 44 +-- .../resources/i18n/lima-business_en_GB.properties | 13 +- .../resources/i18n/lima-business_fr_FR.properties | 13 +- .../org/chorem/lima/beans/BalanceAccountImpl.java | 8 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 58818 -> 59242 bytes .../jasperreports/account/AccountEntry.jrxml | 8 +- .../balance/BalanceReportAccountReport.jrxml | 18 +- .../balance/BalanceSubAccountsReport.jrxml | 48 +-- .../jasperreports/entryBook/DocumentReport.jrxml | 42 ++- .../jasperreports/entryBook/EntryBookReport.jrxml | 76 +--- .../entryBook/FinancialPeriodReport.jrxml | 187 ++------- .../entryBook/TransactionReport.jrxml | 193 +++------- .../generalEntryBook/DocumentReport.jrxml | 418 ++++++++------------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 48 +-- .../GeneralEntryBookEntryReport.jrxml | 11 +- .../generalLedger/DocumentReport.jrxml | 346 +++++++---------- .../generalLedger/GeneralLedgerEntryReport.jrxml | 204 +++------- .../generalLedger/GeneralLedgerReport.jrxml | 101 ++--- 23 files changed, 708 insertions(+), 1209 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java index 5b01b0f..c7beb4f 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java @@ -245,6 +245,16 @@ public class LimaBusinessConfig { saveConfig(); } + public String getDateFormat() { + return config.getOption(BusinessConfigOption.DATE_FORMAT.key); + } + + public void setDateFormat(String locale) { + config.setOption(BusinessConfigOption.DATE_FORMAT.key, locale); + saveConfig(); + } + + public char getDecimalSeparator() { char decimalSeparator = config.getOption(BusinessConfigOption.DECIMAL_SEPARATOR.key).charAt(0); return decimalSeparator; @@ -338,6 +348,7 @@ public class LimaBusinessConfig { SCALE("lima.data.bigDecimal.scale", t("lima.config.scale.label"), n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", t("lima.config.currency.label"), n("lima.config.currency.description"), "false", Boolean.class, false, false), + DATE_FORMAT("lima.config.dateFormat", t("lima.config.dateFormat.label"), n("lima.config.dateFormat.description"), "DD/MM/YYYY", Boolean.class, false, false), DECIMAL_SEPARATOR("lima.data.bigDecimal.decimalSeparator", t("lima.config.decimalSeparator.label"), "", ",", Character.class, false, false), THOUSAND_SEPARATOR("lima.thousandSeparator", t("lima.config.thousandSeparator.label"), n("lima.config.thousandSeparator.description"), " ", Character.class, false, false); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 5c4a88a..6616e08 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -7,6 +7,7 @@ import org.chorem.lima.beans.AccountEntryImpl; import org.chorem.lima.beans.DocumentReport; import org.chorem.lima.beans.DocumentReportImpl; import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.LimaBusinessConfig; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.api.report.AccountReportService; @@ -37,8 +38,6 @@ import static org.nuiton.i18n.I18n.t; @TransactionAttribute public class AccountReportServiceImpl extends AbstractLimaService implements AccountReportService { - protected static final String TITLE = "COMPTE"; - @EJB protected IdentityService identityService; @EJB @@ -46,7 +45,8 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc @Override public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { - DocumentReport documentReport = getDocumentReport(from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima.config.documentReport.accountReport.title"); + DocumentReport documentReport = getDocumentReport(reportName, from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); @@ -90,6 +90,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); accountEntry.setFormatter(bigDecimalFormat); + accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); accountEntries.add(accountEntry); } } @@ -115,13 +116,13 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc return documentReport; } - protected static DocumentReport getDocumentReport(Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { + protected static DocumentReport getDocumentReport(String reportName, Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { Date currentDate = new Date(); DocumentReport documentReport = new DocumentReportImpl(); documentReport.setSubReport(subReport); documentReport.setFormatter(bigDecimalFormat); - documentReport.setTitleReport(TITLE); + documentReport.setTitleReport(reportName); Identity identity = identityService.getIdentity(); String companyName = identity == null ? "" : identity.getName(); 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 7a24de4..7992e2f 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 @@ -77,31 +77,31 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal protected static final Integer ACCOUNT_NUMBER_SIZE = 6; - protected static final String TITLE = "BALANCE"; - protected static final Predicate<BalanceAccount> HAS_NO_ENTRY = new Predicate<BalanceAccount>() { @Override public boolean apply(BalanceAccount subClasses) { boolean result = BigDecimal.ZERO.equals(subClasses.getAmountDebit()) && BigDecimal.ZERO.equals(subClasses.getAmountCredit()) && - BigDecimal.ZERO.equals(subClasses.getSoldeDebit()) && - BigDecimal.ZERO.equals(subClasses.getSoldeCredit()); + BigDecimal.ZERO.equals(subClasses.getDebitBalance()) && + BigDecimal.ZERO.equals(subClasses.getCreditBalance()); return result; } }; @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima.config.documentReport.balanceReport.title"); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); documentReport.setColumnBalanceForPeriodTitle(t("lima.config.documentReport.columnBalanceForPeriodTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -140,8 +140,10 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountsByClasses.put(accountClass, accountSubAccounts); returnedAccounts.add(accountSubAccounts); } - BalanceAccount subClassAccount = bindAccountToBalanceReportAccount(accountClass, account, from, to, bigDecimalFormat); - accountSubAccounts.addSubAccount(subClassAccount); + BalanceAccount subClassAccount = computeSubAccountBalance(accountClass, account, from, to, bigDecimalFormat); + if (subClassAccount != null) { + accountSubAccounts.addSubAccount(subClassAccount); + } } } @@ -164,23 +166,13 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal * Get all entries if true * @throws org.nuiton.topia.persistence.TopiaException */ - 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'); - balanceAccount.setAccountNumber(accountNumber); - balanceAccount.setLabel(account.getLabel()); - balanceAccount.setSubTotalForLabel(t("lima.config.documentReport.subTotalFor")); - balanceAccount.setTotalForLabel(t("lima.config.documentReport.totalFor")); + protected BalanceAccount computeSubAccountBalance(String mainAccountLabel, Account account, Date beginDate, Date endDate, DecimalFormat bigDecimalFormat) { EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); BigDecimal credit = BigDecimal.ZERO; BigDecimal debit = BigDecimal.ZERO; - BigDecimal sold = BigDecimal.ZERO; + BigDecimal balance = BigDecimal.ZERO; List<Object[]> results = entryTopiaDao.getDebitCreditOfBalancedTransaction(account, beginDate, endDate); @@ -199,20 +191,40 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal // set the amounts and sold //sold = debit - credit - sold = sold.add(debit); - sold = sold.subtract(credit); + balance = balance.add(debit); + balance = balance.subtract(credit); + + BalanceAccount balanceAccount = addSubAccountReport(mainAccountLabel, account, bigDecimalFormat, credit, debit, balance); - if (sold.compareTo(BigDecimal.ZERO) == 1) { - balanceAccount.setSoldeDebit(sold.abs()); - balanceAccount.setSoldeCredit(BigDecimal.ZERO); - } else { - balanceAccount.setSoldeCredit(sold.abs()); - balanceAccount.setSoldeDebit(BigDecimal.ZERO); - } - balanceAccount.setAmountCredit(credit); - balanceAccount.setAmountDebit(debit); + return balanceAccount; + } + protected BalanceAccount addSubAccountReport(String mainAccountLabel, Account account, DecimalFormat bigDecimalFormat, BigDecimal credit, BigDecimal debit, BigDecimal balance) { + BalanceAccount balanceAccount = null; + if (BigDecimal.ZERO.compareTo(credit) != 0 || BigDecimal.ZERO.compareTo(debit) != 0) { + balanceAccount = new BalanceAccountImpl(); + balanceAccount.setMainAccountLabel(mainAccountLabel); + balanceAccount.setFormatter(bigDecimalFormat); + + String accountNumber = account.getAccountNumber(); + accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); + balanceAccount.setAccountNumber(accountNumber); + balanceAccount.setLabel(account.getLabel()); + balanceAccount.setSubTotalForLabel(t("lima.config.documentReport.subTotalFor")); + balanceAccount.setTotalForLabel(t("lima.config.documentReport.totalFor")); + + if (balance.compareTo(BigDecimal.ZERO) == 1) { + balanceAccount.setDebitBalance(balance.abs()); + balanceAccount.setCreditBalance(BigDecimal.ZERO); + } else { + balanceAccount.setCreditBalance(balance.abs()); + balanceAccount.setDebitBalance(BigDecimal.ZERO); + } + + balanceAccount.setAmountCredit(credit); + balanceAccount.setAmountDebit(debit); + } 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 ec77f90..31ea391 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 @@ -35,6 +35,7 @@ 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.LimaBusinessConfig; import org.chorem.lima.business.api.ClosedPeriodicEntryBookService; import org.chorem.lima.business.api.EntryService; import org.chorem.lima.business.api.FinancialPeriodService; @@ -90,19 +91,17 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @EJB protected IdentityService identityService; - - protected static final String TITLE = "Journal Général Provisoire"; - @Override public DocumentReport getGeneralEntryBookDocumentReport(Date beginDate, Date endDate, DecimalFormat bigDecimalFormat, JasperReport generalEntryBooksJasperReport, JasperReport entriesJasperReport) { - - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima.config.documentReport.generalEntryBookReport.title"); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + documentReport.setLastPageColumnDescription(t("lima.config.documentReport.entrybook.lastPageColumnDescription")); try { if (beginDate != null && endDate != null) { @@ -134,7 +133,7 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple generalEntryBookEntry = new GeneralEntryBookEntryImpl(); generalEntryBookEntry.setFormatter(bigDecimalFormat); generalEntryBookEntry.setCode(closedPeriodicEntryBook.getEntryBook().getCode()); - generalEntryBookEntry.setLibelle(closedPeriodicEntryBook.getEntryBook().getLabel()); + generalEntryBookEntry.setDescription(closedPeriodicEntryBook.getEntryBook().getLabel()); generalEntryBookEntryByEntryBookCode.put(entryBookCode, generalEntryBookEntry); // init debit and credit @@ -178,10 +177,11 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { GeneralEntryBook generalEntryBook = new GeneralEntryBookImpl(); generalEntryBook.setFormatter(bigDecimalFormat); + generalEntryBook.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); generalEntryBook.setPeriod(financialPeriod.getBeginDate()); generalEntryBook.setSubReport(entriesJasperReport); - generalEntryBook.setSoldeDebit(subAmountDebit); - generalEntryBook.setSoldeCredit(subAmountCredit); + generalEntryBook.setDebitBalance(subAmountDebit); + generalEntryBook.setCreditBalance(subAmountCredit); generalEntryBook.setEntries(Lists.newArrayList(generalEntryBookEntries)); documentReport.addGeneralEntryBooks(generalEntryBook); @@ -191,8 +191,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple } - documentReport.setSoldeDebit(amountDebit); - documentReport.setSoldeCredit(amountCredit); + documentReport.setDebitBalance(amountDebit); + documentReport.setCreditBalance(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/LedgerReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java index 50c5b17..3e4c4d7 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 @@ -31,6 +31,7 @@ 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.LimaBusinessConfig; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.api.report.LedgerReportService; @@ -46,6 +47,7 @@ import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import java.math.BigDecimal; import java.text.DecimalFormat; +import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Date; import java.util.List; @@ -66,16 +68,16 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg @EJB protected IdentityService identityService; - protected static final String TITLE = t("lima-business.document.ledger"); - + // grand livre @Override public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, DecimalFormat decimalFormat, JasperReport generalLedgersJasperReport, JasperReport entriesJasperReport) { - - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); + String reportName = t("lima.config.documentReport.ledgerReport.title"); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); documentReport.setColumnDateTitle(t("lima.config.documentReport.setColumnDateTitle")); documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.setColumnEntryBookTitle")); documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); documentReport.setColumnBalanceTitle(t("lima.config.documentReport.columnBalanceTitle")); @@ -85,6 +87,8 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg BalanceTrial balanceTrial = reportService.generateLedger(beginDate, endDate, null, true); documentReport.setHeaderSelectedAccounts(balanceTrial.getFromToAccountNumber()); + + SimpleDateFormat dateFormatter = new SimpleDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); if (balanceTrial.getReportsDatas() != null) { for (ReportsDatas reportsDatas : balanceTrial.getReportsDatas()) { @@ -101,7 +105,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg BigDecimal amountDebit = reportsDatas.getAmountDebit(); generalLedger.setDebit(amountDebit); generalLedger.setCredit(amountCredit); - generalLedger.setSolde(amountDebit.subtract(amountCredit)); + generalLedger.setBalance(amountDebit.subtract(amountCredit)); generalLedger.setSubReport(entriesJasperReport); generalLedger.setNbEntries(balanceTrial.getReportsDatas().size()); documentReport.addGeneralLedgers(generalLedger); @@ -125,6 +129,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg GeneralLedgerEntry generalLedgerEntry = new GeneralLedgerEntryImpl(); generalLedgerEntry.setFormatter(decimalFormat); + generalLedgerEntry.setDateFormat(dateFormatter); generalLedgerEntry.setDate(entry.getFinancialTransaction().getTransactionDate()); generalLedgerEntry.setEntryBook(entryBookCode); generalLedgerEntry.setVoucher(entry.getVoucher()); @@ -132,7 +137,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg generalLedgerEntry.setDebit(entryAmountDebit); generalLedgerEntry.setCredit(entryAmountCredit); balance = balance.add(entryAmountDebit.subtract(entryAmountCredit)); - generalLedgerEntry.setSolde(balance); + generalLedgerEntry.setBalance(balance); generalLedgerEntry.setNbEntries(entries.size()); generalLedger.addEntries(generalLedgerEntry); } 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 41d03a5..cf5a0a5 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 @@ -31,6 +31,7 @@ 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.LimaBusinessConfig; import org.chorem.lima.business.api.EntryBookService; import org.chorem.lima.business.api.EntryService; import org.chorem.lima.business.api.FinancialPeriodService; @@ -48,6 +49,7 @@ import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import java.math.BigDecimal; import java.text.DecimalFormat; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @@ -77,30 +79,26 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo @EJB protected FinancialTransactionService financialTransactionService; - 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 getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, DecimalFormat bigDecimalFormat, JasperReport entryBooksJasperReport, JasperReport financialPeriodsJasperReport, JasperReport transactionsJasperReport) { + String reportName = t("lima.config.documentReport.provisionalEntryBookReport.title"); + DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); - - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); + documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); + documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + + documentReport.setLastPageColumnDescription(t("lima.config.documentReport.generalEntrybook.lastPageColumnDescription")); try { if (beginDate != null && endDate != null) { + SimpleDateFormat dateFormatter = new SimpleDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); BigDecimal documentReportDebit = BigDecimal.ZERO; BigDecimal documentReportCredit = BigDecimal.ZERO; @@ -118,7 +116,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for(EntryBook entryBook:entryBooks) { org.chorem.lima.beans.EntryBook entryBookReport = new EntryBookImpl(); - entryBookReport.setLibelle(entryBook.getLabel()); + entryBookReport.setLabel(entryBook.getLabel()); entryBookReport.setCode(entryBook.getCode()); entryBookReport.setSubReport(financialPeriodsJasperReport); entryBookReport.setFormatter(bigDecimalFormat); @@ -153,11 +151,12 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo Transaction transaction = new TransactionImpl(); transaction.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); transaction.setAccount(accountLabel); - transaction.setLibelle(entry.getDescription()); + transaction.setDescription(entry.getDescription()); transaction.setVoucher(entry.getVoucher()); transaction.setDebit(debit); transaction.setCredit(credit); transaction.setFormatter(bigDecimalFormat); + transaction.setDateFormat(dateFormatter); financialPeriodDebit = financialPeriodDebit.add(debit); financialPeriodCredit = financialPeriodCredit.add(credit); @@ -169,9 +168,10 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo if (financialPeriodDebit.compareTo(BigDecimal.ZERO) != 0 || financialPeriodCredit.compareTo(BigDecimal.ZERO) != 0) { financialPeriodReport.setEntryBookCode(entryBook.getCode()); - financialPeriodReport.setSoldeDebit(financialPeriodDebit); - financialPeriodReport.setSoldeCredit(financialPeriodCredit); + financialPeriodReport.setDebitBalance(financialPeriodDebit); + financialPeriodReport.setCreditBalance(financialPeriodCredit); financialPeriodReport.setFormatter(bigDecimalFormat); + financialPeriodReport.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); entryBookReport.addFinancialPeriods(financialPeriodReport); entryBookSoldeDebit = entryBookSoldeDebit.add(financialPeriodDebit); @@ -181,15 +181,15 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo } if (entryBookSoldeDebit.compareTo(BigDecimal.ZERO) != 0 || entryBookSoldeCredit.compareTo(BigDecimal.ZERO) != 0) { - entryBookReport.setSoldeDebit(entryBookSoldeDebit); - entryBookReport.setSoldeCredit(entryBookSoldeCredit); + entryBookReport.setDebitBalance(entryBookSoldeDebit); + entryBookReport.setCreditBalance(entryBookSoldeCredit); documentReport.addEntryBooks(entryBookReport); documentReportDebit = documentReportDebit.add(entryBookSoldeDebit); documentReportCredit = documentReportCredit.add(entryBookSoldeCredit); } } - documentReport.setSoldeDebit(documentReportDebit); - documentReport.setSoldeCredit(documentReportCredit); + documentReport.setDebitBalance(documentReportDebit); + documentReport.setCreditBalance(documentReportCredit); } } catch (Exception ex) { log.error("Can't create document", ex); 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 f6f147a..921217d 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 @@ -54,15 +54,19 @@ lima.config.configFileName.description=Filename of Lima's configuration lima.config.currency.description= lima.config.currency.label= lima.config.data.dir.description=Data directory of Lima +lima.config.dateFormat.description= +lima.config.dateFormat.label= lima.config.decimalSeparator.label= lima.config.documentReport.account.documentReportModelPath.description= lima.config.documentReport.account.noAccount=Any account present lima.config.documentReport.account.noAccountTitle=Any account present +lima.config.documentReport.accountReport.title=ACCOUNT lima.config.documentReport.assets=Assets lima.config.documentReport.balance=Balance lima.config.documentReport.balance.balanceAccountReportModelPath.description= lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= lima.config.documentReport.balance.documentReportModelPath.description= +lima.config.documentReport.balanceReport.title=BALANCE lima.config.documentReport.balanceSheet=Balance lima.config.documentReport.columnAccountTitle=Account lima.config.documentReport.columnBalanceForPeriodTitle=Balance @@ -79,10 +83,13 @@ lima.config.documentReport.currentAsset=Current asset lima.config.documentReport.entrybook.documentReportModelPath.description= lima.config.documentReport.entrybook.entryBookModelPath.description= lima.config.documentReport.entrybook.financialPeriodModelPath.description= +lima.config.documentReport.entrybook.lastPageColumnDescription= lima.config.documentReport.entrybook.transactionReportModelPath.description= +lima.config.documentReport.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= +lima.config.documentReport.generalEntrybook.lastPageColumnDescription= lima.config.documentReport.generalLedger.documentReportModelPath.description= lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= lima.config.documentReport.generalLedger.generalLedgerModelPath.description= @@ -90,9 +97,11 @@ lima.config.documentReport.headerCurrencyLabel=Currency\: lima.config.documentReport.headerSelectedAccounts=%s to %s lima.config.documentReport.headerSelectedAccountsLabel=Accounts\: lima.config.documentReport.investments=Investments +lima.config.documentReport.ledgerReport.title=LEDGER lima.config.documentReport.liabilities=Liabilities -lima.config.documentReport.setColumnDateTitle= -lima.config.documentReport.setColumnEntryBookTitle= +lima.config.documentReport.provisionalEntryBookReport.title=SUMMARY BY ACCOUNT +lima.config.documentReport.setColumnDateTitle=Date +lima.config.documentReport.setColumnEntryBookTitle=Entry book lima.config.documentReport.subTotalFor=Sub total for\: lima.config.documentReport.titleCurrentDate=Printed on %s at %s lima.config.documentReport.titleFromToDate=From %s to %s 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 d8d52a9..778321c 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 @@ -53,14 +53,18 @@ lima.config.configFileName.description=Nom du fichier de configuration de Lima lima.config.currency.description= lima.config.currency.label= lima.config.data.dir.description=Répertoire des données de Lima +lima.config.dateFormat.description= +lima.config.dateFormat.label= lima.config.decimalSeparator.label= 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.accountReport.title=COMPTE lima.config.documentReport.assets=avoirs lima.config.documentReport.balance=Solde 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.balanceReport.title=BALANCE lima.config.documentReport.balanceSheet=Balance lima.config.documentReport.bigDecimalFormat=formattage des montants lima.config.documentReport.columnAccountTitle=Compte @@ -79,12 +83,15 @@ lima.config.documentReport.dir.description=Dossier des rapports 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.lastPageColumnDescription=Total pour les journaux sélectionnés 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.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE 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.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' 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' @@ -92,9 +99,11 @@ lima.config.documentReport.headerCurrencyLabel=Devise\: lima.config.documentReport.headerSelectedAccounts=%s à %s lima.config.documentReport.headerSelectedAccountsLabel=Comptes\: lima.config.documentReport.investments=investissements +lima.config.documentReport.ledgerReport.title=GRAND LIVRE lima.config.documentReport.liabilities=passif -lima.config.documentReport.setColumnDateTitle= -lima.config.documentReport.setColumnEntryBookTitle= +lima.config.documentReport.provisionalEntryBookReport.title=RÉCAPITULATIF PAR COMPTE +lima.config.documentReport.setColumnDateTitle=Date +lima.config.documentReport.setColumnEntryBookTitle=Journal lima.config.documentReport.subTotalFor=Sous total pour\: lima.config.documentReport.titleCurrentDate=Édition du %s à %s lima.config.documentReport.titleFromToDate=Du %s au %s diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java index 4b1070b..de819dc 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java @@ -37,16 +37,16 @@ public class BalanceAccountImpl extends BalanceAccount { 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; + BigDecimal newSoldeDebit = this.debitBalance == null ? BigDecimal.ZERO : this.debitBalance; + BigDecimal newSoldeCredit = this.creditBalance == null ? BigDecimal.ZERO : this.creditBalance; this.amountDebit = subAccount.getAmountDebit().add(newAmountDebit); this.amountCredit = subAccount.getAmountCredit().add(newAmountCredit); - this.soldeDebit = subAccount.getSoldeDebit().add(newSoldeDebit); + this.debitBalance = subAccount.getDebitBalance().add(newSoldeDebit); - this.soldeCredit = subAccount.getSoldeCredit().add(newSoldeCredit); + this.creditBalance = subAccount.getCreditBalance().add(newSoldeCredit); } // firePropertyChange(PROPERTY_SUB_ACCOUNTS, null, subAccount); diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 5e7eea2..8633e8e 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml index e46f3df..f800454 100644 --- a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -15,7 +15,11 @@ <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> <style name="Default" isDefault="true" fontName="DejaVu Sans"/> <style name="Default oblique" fontName="DejaVu Sans Mono"/> - <field name="accountNumber" class="java.lang.String"/> + + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="dateFormat" class="java.lang.String"/> + + <field name="accountNumber" class="java.lang.String"/> <field name="transactionDate" class="java.util.Date"/> <field name="code" class="java.lang.String"/> <field name="voucher" class="java.lang.String"/> @@ -23,7 +27,7 @@ <field name="lettering" class="java.lang.String"/> <field name="debit" class="java.math.BigDecimal"/> <field name="credit" class="java.math.BigDecimal"/> - <field name="formatter" class="java.text.DecimalFormat"/> + <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> diff --git a/lima-report/src/main/resources/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/BalanceReportAccountReport.jrxml index 3a33815..246de93 100644 --- a/lima-report/src/main/resources/jasperreports/balance/BalanceReportAccountReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-02T12:49:55 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-02T12:49:55 --> <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"/> @@ -10,18 +10,16 @@ <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="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="formatter" class="java.text.DecimalFormat"/> + + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + + <field name="subAccounts" class="java.util.List"/> + <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"> diff --git a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml index 6214da6..4f8896d 100644 --- a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -10,30 +10,32 @@ <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> + <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"/> + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> <field name="mainAccountLabel" class="java.lang.String"/> <field name="totalForLabel" class="java.lang.String"/> <field name="subTotalForLabel" class="java.lang.String"/> - <variable name="amountDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + + <variable name="amountBalanceDebit" 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"> + <variable name="amountBalanceCredit" 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> + <variable name="sumBalanceDebit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{debitBalance}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="soldeCreditSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{soldeCredit}]]></variableExpression> + <variable name="sumBalanceCredit" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{creditBalance}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> <detail> @@ -110,7 +112,7 @@ <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> @@ -124,7 +126,7 @@ <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> </textField> </band> </detail> @@ -170,7 +172,7 @@ <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> + <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -182,7 +184,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="52091c73-538e-4f13-9e80-d8ceceb20925"> @@ -203,7 +205,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{soldeCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{sumBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceCredit}) : ""]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="7f9a6117-e3b4-492f-ba5a-b4f913516294"> @@ -215,7 +217,7 @@ <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> + <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -227,7 +229,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{amountDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{amountBalanceDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountBalanceDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="d149a582-98a8-4cce-ab19-c42f1142839c"> @@ -250,7 +252,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{amountCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{amountBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountBalanceCredit}) : ""]]></textFieldExpression> </textField> </frame> </band> @@ -297,7 +299,7 @@ <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> + <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -309,7 +311,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{soldeDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="6bc7b25f-7a33-4243-8b41-c12fc69bfdd9"> @@ -330,7 +332,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{soldeCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{soldeCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{sumBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceCredit}) : ""]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="4b3cfcb7-e1c1-4825-824d-3f30c424cb8d"> @@ -342,7 +344,7 @@ <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> + <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -354,7 +356,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{amountDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{amountBalanceDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountBalanceDebit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0736caf4-6f73-417e-93c8-2a81a81f6721"> @@ -377,7 +379,7 @@ <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{amountCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{amountBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{amountBalanceCredit}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml index 4e76999..d6ade61 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml @@ -4,8 +4,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="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" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> <box> @@ -15,18 +18,21 @@ <rightPen lineWidth="0.6" lineColor="#804000"/> </box> </style> + <style name="FooterHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> - <style name="FooterColumn" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="8" isBold="true"> - <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"/> + <style name="FooterColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> </style> + <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="entryBooks" class="java.util.List"/> @@ -47,10 +53,12 @@ <field name="columnDebitTitle" class="java.lang.String"/> <field name="columnDescriptionTitle" class="java.lang.String"/> <field name="columnTotalForPeriodTitle" class="java.lang.String"/> - <field name="columnVoucherTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" class="java.lang.String"/> + + <field name="lastPageColumnDescription" class="java.lang.String"/> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> <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> @@ -203,33 +211,31 @@ </pageFooter> <lastPageFooter> <band height="30"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> <frame> - <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"/> + <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"/> <textField isBlankWhenNull="true"> - <reportElement style="FooterColumn" x="0" y="0" width="434" height="20" forecolor="#736343" uuid="f818f119-5580-46fd-acbd-086f7d222dde"/> + <reportElement style="FooterColumn" x="0" y="0" width="434" height="20" uuid="f818f119-5580-46fd-acbd-086f7d222dde"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="12" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Total pour les journaux sélectionnés"]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{lastPageColumnDescription}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="FooterColumn" x="434" y="0" width="72" height="20" forecolor="#736343" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"/> + <reportElement style="FooterColumn" x="434" y="0" width="72" height="20" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="FooterColumn" x="506" y="0" width="72" height="20" forecolor="#736343" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"/> + <reportElement style="FooterColumn" x="506" y="0" width="72" height="20" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> </textField> </frame> <textField isBlankWhenNull="false"> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml index 15581ab..79c7327 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T11:57:53 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T11:57: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="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,13 +10,17 @@ <queryString> <![CDATA[]]> </queryString> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="financialPeriods" class="java.util.List"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="code" class="java.lang.String"/> - <field name="libelle" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + + <field name="financialPeriods" class="java.util.List"/> + + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> + <field name="code" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{financialPeriods})]]></variableExpression> </variable> @@ -25,67 +29,30 @@ <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" isRemoveLineWhenBlank="true" 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.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> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"/> <textField pattern="" isBlankWhenNull="true"> - <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> + <reportElement mode="Transparent" x="0" y="0" width="434" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"/> <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"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Journal " + $F{code} + " " + $F{libelle}]]></textFieldExpression> + <textFieldExpression><![CDATA["Journal " + $F{code} + " " + $F{label}]]></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> + <reportElement x="434" y="0" width="72" height="10" uuid="baca77fb-1d57-428f-8746-1bb482b61b55"/> <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> + <reportElement x="506" y="0" width="72" height="10" uuid="da04b7ce-dd80-4c40-a0cb-7d74dac0da00"/> <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> @@ -97,10 +64,7 @@ <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <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"> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - </reportElement> + <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"/> <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> </subreport> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml index ae5b8fd..63e271a 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T14:47:39 --> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-07-07T15:18: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="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,14 +18,13 @@ <queryString> <![CDATA[]]> </queryString> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> - <field name="transactions" class="java.util.List"/> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> <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"/> + <field name="transactions" class="java.util.List"/> <variable name="generalEntryBookEntry" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{transactions})]]></variableExpression> </variable> @@ -34,32 +33,13 @@ <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> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"/> <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 pattern="" isBlankWhenNull="true"> - <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"/> - <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> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="80"/> @@ -67,37 +47,19 @@ <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> + <reportElement x="434" y="0" width="72" height="10" uuid="e6c93d97-54e3-4b70-9c28-56a3319bad77"/> <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"/> + <leftPen lineWidth="0.6" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> </box> </textField> + <textField pattern=""> + <reportElement x="506" y="0" width="72" height="10" uuid="e6c93d97-54e3-4b70-9c28-56a3319bad88"/> + <box> + <leftPen lineWidth="0.6" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + </textField> </frame> </band> </pageHeader> @@ -106,31 +68,12 @@ <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" isRemoveLineWhenBlank="true" 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.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> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"/> <textField pattern="" isBlankWhenNull="true"> - <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> + <reportElement x="0" y="0" width="434" height="10" isRemoveLineWhenBlank="true" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"/> <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"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="true" isItalic="true"/> @@ -139,34 +82,9 @@ <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> + <reportElement x="434" y="0" width="72" height="10" uuid="128b759f-c6d0-4310-a83c-8b9993d537dd"/> <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> @@ -179,15 +97,7 @@ <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> </subreport> <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="10" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="1095b1fb-ac01-4f55-b694-2e4e5ec17a76"> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - <property name="local_mesure_unity" value="pixel"/> - <property name="com.jaspersoft.studio.unit.y" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <printWhenExpression><![CDATA[new Boolean(!($V{PAGE_NUMBER} == 1 && $V{REPORT_COUNT} == 1))]]></printWhenExpression> - </reportElement> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="10" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="1095b1fb-ac01-4f55-b694-2e4e5ec17a76"/> <dataSourceExpression><![CDATA[$V{generalEntryBookEntry}]]></dataSourceExpression> <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> </subreport> @@ -196,34 +106,17 @@ <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="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> + <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"/> <box> - <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"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.8" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textField pattern="" isBlankWhenNull="true"> - <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"/> - <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.y" value="px"/> - </reportElement> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="d3f672ab-80d2-4467-9ff9-73d4611a3025"/> <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8" isBold="true" isItalic="true"/> @@ -232,38 +125,28 @@ <textFieldExpression><![CDATA["Solde pour le journal " + $F{entryBookCode} + " jusqu'à fin " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> - <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"/> - </reportElement> + <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="#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="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> - <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"/> - </reportElement> + <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="#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="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml index 64fdf12..c841467 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml @@ -1,22 +1,29 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T11:59:00 --> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-07-07T12:30: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="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="DejaVu Sans"/> <style name="Default oblique" fontName="DejaVu Sans Mono"/> + <style name="bodyColumn" fontName="DejaVu Sans" fontSize="8"> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </style> <queryString> <![CDATA[]]> </queryString> - <field name="libelle" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="dateFormat" class="java.text.SimpleDateFormat"/> + <field name="description" 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> @@ -36,35 +43,15 @@ <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> + <reportElement style="bodyColumn" x="0" y="0" width="60" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new SimpleDateFormat("dd/MM/yyyy").format($F{transactionDate})]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{dateFormat}.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> + <reportElement style="bodyColumn" x="60" y="0" width="100" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> @@ -72,16 +59,7 @@ <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> + <reportElement style="bodyColumn" x="160" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> @@ -89,33 +67,15 @@ <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> + <reportElement style="bodyColumn" x="200" y="0" width="234" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"/> <textElement textAlignment="Left" verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{description}]]></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> + <reportElement style="bodyColumn" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" size="8"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> @@ -123,10 +83,7 @@ <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> + <reportElement style="bodyColumn" x="434" y="0" width="72" height="10" uuid="39bdbda9-8233-4e46-b3ed-d5f0d06e2d86"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> @@ -140,29 +97,15 @@ <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> + <reportElement mode="Transparent" x="0" y="0" width="578" height="10" uuid="48190dbf-c1d0-421a-bfcb-9c9db0c0c359"/> <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"/> + <topPen lineWidth="0.0" lineStyle="Dashed" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Dashed" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </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> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="d622e85e-b93e-4be5-90e0-cf3b854f012d"/> <textElement> <font size="8" isBold="true"/> <paragraph leftIndent="80"/> @@ -171,19 +114,11 @@ </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"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> <font fontName="DejaVu Sans Mono" size="8"/> @@ -192,20 +127,7 @@ <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> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="c52c36a6-6a50-473b-9dad-0526f039b7c1"/> <textElement textAlignment="Right"> <font fontName="DejaVu Sans Mono" size="8"/> <paragraph rightIndent="2"/> @@ -220,29 +142,18 @@ <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> + <reportElement mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="d7d82e83-663d-410a-a61d-6211645557ce"/> <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#804000"/> + <topPen lineWidth="0.6" lineStyle="Dashed" 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> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="16735e42-8adf-47c5-8aa6-590bbc2327a9"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> <textElement> <font size="8" isBold="true"/> <paragraph leftIndent="80"/> @@ -250,18 +161,9 @@ <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> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="4c23c4e2-1c93-4a78-b82b-895286708171"/> <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"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> @@ -271,21 +173,12 @@ <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"> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="a7b19080-fcc5-407b-ae5c-20a85afd363e"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement textAlignment="Right"> <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml index 971ba90..367cf23 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml @@ -1,26 +1,58 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T17:41:37 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T17:41: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"/> - <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> - <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <style name="FooterHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="FooterColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <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="generalEntryBooks" class="java.util.List"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="companyName" class="java.lang.String"/> - <field name="title" class="java.lang.String"/> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="generalEntryBooks" class="java.util.List"/> + + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> + + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + + <field name="columnEntryBookTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnTotalForPeriodTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + + <field name="lastPageColumnDescription" class="java.lang.String"/> + + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> <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> @@ -28,168 +60,101 @@ <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> + <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{titleReport}]]></textFieldExpression> + </textField> + <textField 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[$F{titleCurrentDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="10" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="16" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></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"> + <reportElement style="TableHeader" x="0" y="0" width="578" height="20" 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> + <textField> + <reportElement style="HeaderColumn" x="0" y="0" width="40" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"/> <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> + <textFieldExpression><![CDATA[$F{columnEntryBookTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="40" y="0" width="394" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <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> + <textFieldExpression><![CDATA[$F{columnDescriptionTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="0" width="144" height="10" uuid="1bc6ab8b-d490-46a2-9a10-8f4c4f219889" /> <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> + <textFieldExpression><![CDATA[$F{columnTotalForPeriodTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="10" width="72" height="10" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"/> <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> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="506" y="10" width="72" height="10" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> </frame> </band> </columnHeader> @@ -223,98 +188,49 @@ </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="DejaVu Sans Mono" 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="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="DejaVu Sans Mono" 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> - <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> + <lastPageFooter> + <band height="30"> + <frame> + <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" uuid="ffa6f4ff-14e5-4501-acbe-0c4e832d9c2a"/> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="0" y="0" width="434" height="20" uuid="f818f119-5580-46fd-acbd-086f7d222dde"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="12" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA[$F{lastPageColumnDescription}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="434" y="0" width="72" height="20" uuid="8382935a-23c9-48a0-88f3-aa486cccd575"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="506" y="0" width="72" height="20" uuid="c7fa4a13-051c-40c0-b663-58b0401402b4"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> + </textField> + </frame> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="20" width="288" height="10" uuid="fd62df4f-6500-4fea-93be-fe749f161de6"/> + <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="e5018134-bbde-4b3e-a83d-7abf00c56c09"/> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index 2506f1e..0ddb70a 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T17:29:13 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T17:29:13 --> <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"/> @@ -18,12 +18,16 @@ <queryString> <![CDATA[]]> </queryString> - <field name="soldeDebit" class="java.math.BigDecimal"/> - <field name="soldeCredit" class="java.math.BigDecimal"/> + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="dateFormat" class="java.text.SimpleDateFormat"/> + + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> <field name="entries" class="java.util.List"/> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="period" class="java.util.Date"/> - <field name="formatter" class="java.text.DecimalFormat"/> + <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> @@ -32,12 +36,7 @@ <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> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="b362ba5e-b960-4aff-8c28-d8288ee352a1"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -45,11 +44,7 @@ <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> + <reportElement x="0" y="0" width="578" height="10" forecolor="#736343" uuid="1472eda4-3df8-47ae-aba7-0aae2d2bedae"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -73,12 +68,7 @@ </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> + <reportElement style="Default" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FFFFFF" backcolor="#FFFFFF" uuid="571d1774-22c4-4ab4-901b-7470c74f0405"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -86,13 +76,7 @@ <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> + <reportElement x="0" y="0" width="434" height="10" forecolor="#736343" uuid="dc68030b-597d-47b5-8be9-eecfdde17f5e"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -117,7 +101,7 @@ <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement style="Default" x="506" y="0" width="72" height="10" forecolor="#736343" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> @@ -131,7 +115,7 @@ <font fontName="DejaVu Sans Mono" 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> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml index 0a0444b..5e154d0 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/GeneralEntryBookEntryReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T11:54:13 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T11:54:13 --> <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"/> @@ -10,11 +10,12 @@ <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="code" class="java.lang.String"/> - <field name="libelle" class="java.lang.String"/> + <field name="description" 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"> @@ -47,7 +48,7 @@ <font size="8"/> <paragraph leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{libelle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{description}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml index 130ea91..7a1a5ac 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml @@ -1,258 +1,179 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T11:59:35 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T11:59: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="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" fontName="DejaVu Sans" fontSize="8"/> - <style name="Bold" fontName="DejaVu Sans" fontSize="8"/> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8"/> - <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="DejaVu Sans" fontSize="12" isBold="true"/> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <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="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <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"/> - <field name="formatter" class="java.text.DecimalFormat"/> - <field name="generalLedgers" class="java.util.List"/> + + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="generalLedgers" class="java.util.List"/> + + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> + + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + + <field name="columnBalanceTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDateTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnEntryBookTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" class="java.lang.String"/> + <variable name="generalLedgers" 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="generalLedgers"/> <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> + + <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{titleReport}]]></textFieldExpression> + </textField> + <textField 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[$F{titleCurrentDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="10" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + + <pageHeader> + <band height="16" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></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"> + <reportElement style="TableHeader" mode="Opaque" x="0" y="0" width="578" height="20" 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> + <textField> + <reportElement style="HeaderColumn" x="0" y="0" width="60" height="20" uuid="63da28a1-a793-4bf5-81d4-6a4d6fc1e4df"/> <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> + <textFieldExpression><![CDATA[$F{columnDateTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="60" y="0" width="40" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <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> + <textFieldExpression><![CDATA[$F{columnEntryBookTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="100" y="0" width="40" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <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> + <textFieldExpression><![CDATA[$F{columnVoucherTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="140" y="0" width="222" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <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> + <textFieldExpression><![CDATA[$F{columnDescriptionTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="362" y="0" width="72" height="20" uuid="b6ea8597-d637-47d1-9a39-7c99101594e9"/> <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> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="434" y="0" width="72" height="20" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <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> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="HeaderColumn" x="506" y="0" width="72" height="20" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <text><![CDATA[Solde]]></text> - </staticText> + <textFieldExpression><![CDATA[$F{columnBalanceTitle}]]></textFieldExpression> + </textField> </frame> </band> </columnHeader> + <detail> <band height="20" splitType="Stretch"> <subreport isUsingCache="false" runToBottom="false"> @@ -262,6 +183,7 @@ </subreport> </band> </detail> + <pageFooter> <band height="10" splitType="Stretch"> <property name="local_mesure_unitheight" value="pixel"/> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml index 6ec6335..675f32d 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T12:00:01 --> +<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> +<!-- 2015-07-07T11:29:55 --> <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"/> @@ -15,17 +15,27 @@ <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> <style name="Default" isDefault="true" fontName="DejaVu Sans"/> <style name="Default oblique" fontName="DejaVu Sans Mono"/> + <style name="TableBody" fontName="DejaVu Sans"/> + <style name="BodyColumn" fontName="DejaVu Sans" fontSize="8"> + <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> + </style> <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> + <field name="dateFormat" class="java.text.SimpleDateFormat"/> <field name="date" class="java.util.Date"/> <field name="entryBook" class="java.lang.String"/> <field name="voucher" class="java.lang.String"/> <field name="description" 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="formatter" class="java.text.DecimalFormat"/> + <field name="balance" class="java.math.BigDecimal"/> <field name="nbEntries" class="java.lang.Integer"/> <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> @@ -35,141 +45,60 @@ <variableExpression><![CDATA[$F{credit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="subTotalSolde" class="java.math.BigDecimal" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> + <variable name="subTotalBalance" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{balance}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> <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> + <reportElement style="BodyColumn" positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="60" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" leftIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{dateFormat}.format($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> + <reportElement style="BodyColumn" x="60" y="0" width="40" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"/> <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> + <reportElement style="BodyColumn" x="100" y="0" width="40" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> <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> + <reportElement style="BodyColumn" x="140" y="0" width="222" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[$F{description}]]></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> + <reportElement style="BodyColumn" x="362" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> <paragraph lineSpacingSize="0.0" rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[new Boolean($F{debit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debit}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="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> + <reportElement style="BodyColumn" x="434" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="true"/> <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 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> + <reportElement style="BodyColumn" x="506" y="0" width="72" height="10" uuid="961e8048-c6ef-4b58-a857-31f9f29406c8"/> <textElement textAlignment="Right"> - <font size="8"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($F{solde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{solde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($F{balance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{balance}) : ""]]></textFieldExpression> </textField> </band> </detail> @@ -179,72 +108,59 @@ <property name="com.jaspersoft.studio.unit.height" value="px"/> <printWhenExpression><![CDATA[$V{REPORT_COUNT} < $F{nbEntries}]]></printWhenExpression> <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> + <reportElement x="0" y="0" width="578" height="10" uuid="5863f40f-6423-4463-ad4a-c4cecab0323c"/> <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.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> <textField> - <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + <textElement> + <font size="8" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + </textField> + <textField> + <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> <textElement textAlignment="Right"> - <font size="8"/> + <font size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[new Boolean($V{subTotalDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalDebit}) : ""]]></textFieldExpression> </textField> <textField> - <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> <textElement textAlignment="Right"> - <font size="8"/> + <font size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> <textFieldExpression><![CDATA[new Boolean($V{subTotalCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalCredit}) : ""]]></textFieldExpression> </textField> <textField> - <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> + <box> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> <textElement textAlignment="Right"> - <font size="8"/> + <font size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{subTotalSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalSolde}) : ""]]></textFieldExpression> - </textField> - <textField> - <reportElement x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> - <textElement> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{subTotalBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{subTotalBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml index 7169223..9987b00 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> -<!-- 2015-03-11T12:00:32 --> +<!-- Created with Jaspersoft Studio version 6.0.3.final using JasperReports Library version 6.0.3 --> +<!-- 2015-03-11T12:00:32 --> <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" uuid="75ff86c6-c370-4f0b-a2d3-e17324 [...] <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,18 @@ <queryString> <![CDATA[]]> </queryString> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="formatter" class="java.text.DecimalFormat"/> + + <field name="entries" class="java.util.List"/> + <field name="accountNumber" class="java.lang.String"/> <field name="label" 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="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="entries" class="java.util.List"/> + <field name="balance" class="java.math.BigDecimal"/> <field name="nbEntries" class="java.lang.Integer"/> - <field name="formatter" class="java.text.DecimalFormat"/> + <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> @@ -38,8 +41,8 @@ <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> + <variable name="totalPeriodBalance" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{balance}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> <variable name="totalAccountDebit" class="java.math.BigDecimal" calculation="Sum"> @@ -50,35 +53,27 @@ <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> + <variable name="totalAccountBalance" class="java.math.BigDecimal" calculation="Sum"> + <variableExpression><![CDATA[$F{balance}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="solde1" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> - <variableExpression><![CDATA[$F{solde}]]></variableExpression> + <variable name="balance1" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variableExpression><![CDATA[$F{balance}]]></variableExpression> </variable> <detail> <band height="10"> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> <frame> - <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="644d4927-8973-45d7-bd80-0512dad33987"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - </reportElement> + <reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="578" height="10" forecolor="#FEEEDE" backcolor="#FEEEDE" uuid="644d4927-8973-45d7-bd80-0512dad33987"/> <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.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> <textField pattern=""> - <reportElement mode="Transparent" x="0" y="0" width="578" height="10" forecolor="#736343" uuid="b3b8449e-a63c-445d-8699-f0b9579f34f3"> - <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> + <reportElement mode="Transparent" x="0" y="0" width="578" height="10" forecolor="#736343" uuid="b3b8449e-a63c-445d-8699-f0b9579f34f3"/> <textElement textAlignment="Center"> <font size="8" isBold="true"/> <paragraph leftIndent="0"/> @@ -89,10 +84,7 @@ </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="0877d57b-0e57-4e7a-a97e-c5418acbf030"> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="0877d57b-0e57-4e7a-a97e-c5418acbf030"/> <dataSourceExpression><![CDATA[$V{entries}]]></dataSourceExpression> <subreportExpression><![CDATA[$F{subReport}]]></subreportExpression> </subreport> @@ -101,25 +93,15 @@ <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> + <reportElement x="0" y="0" width="578" height="10" uuid="5863f40f-6423-4463-ad4a-c4cecab0323c"/> <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.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> <textField isBlankWhenNull="true"> - <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> <textElement textAlignment="Right"> <font size="8" isBold="true"/> <paragraph rightIndent="2"/> @@ -127,14 +109,7 @@ <textFieldExpression><![CDATA[$F{debit}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> <textElement textAlignment="Right"> <font size="8" isBold="true"/> <paragraph rightIndent="2"/> @@ -142,27 +117,15 @@ <textFieldExpression><![CDATA[$F{credit}]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - <property name="local_mesure_unitx" value="pixel"/> - <property name="com.jaspersoft.studio.unit.x" value="px"/> - </reportElement> + <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> <textElement textAlignment="Right"> <font size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[$F{solde}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{balance}]]></textFieldExpression> </textField> <textField pattern=""> - <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"> - <property name="local_mesure_unitwidth" value="pixel"/> - <property name="com.jaspersoft.studio.unit.width" value="px"/> - <property name="local_mesure_unitheight" value="pixel"/> - <property name="com.jaspersoft.studio.unit.height" value="px"/> - </reportElement> + <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> <textElement> <font size="8" isBold="true"/> </textElement> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 8b18d5e8b4dc9168960b1f7d4062cadd11386ebf Author: dcosse <cosse@codelutin.com> Date: Mon Jul 20 09:53:04 2015 +0200 refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données --- lima-report/pom.xml | 10 +- .../java/org/chorem/lima/report/DocumentsEnum.java | 4 +- .../org/chorem/lima/report/LimaReportConfig.java | 22 ++- .../lima/report/service/DocumentService.java | 202 ++++++++++----------- .../src/main/resources/reports/vat_form_fr.pdf | Bin 222623 -> 244238 bytes .../org/chorem/lima/server/HttpServerService.java | 7 +- lima-swing/src/main/resources/import/vat_base.csv | 107 +++++------ .../src/main/resources/import/vat_default.csv | 107 +++++------ pom.xml | 6 + 9 files changed, 241 insertions(+), 224 deletions(-) diff --git a/lima-report/pom.xml b/lima-report/pom.xml index 2ba0fba..5467a54 100644 --- a/lima-report/pom.xml +++ b/lima-report/pom.xml @@ -21,12 +21,6 @@ <version>${project.version}</version> <scope>compile</scope> </dependency> - <!--<dependency>--> - <!--<groupId>${project.groupId}</groupId>--> - <!--<artifactId>lima-business</artifactId>--> - <!--<version>${project.version}</version>--> - <!--<scope>compile</scope>--> - <!--</dependency>--> <dependency> <groupId>${project.groupId}</groupId> <artifactId>lima-callao</artifactId> @@ -67,13 +61,13 @@ <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> - <scope>runtime</scope> + <!--<scope>runtime</scope>--> </dependency> <!-- FIXME tchemit 2015-02-27 Do we really need this here ? --> <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox-examples</artifactId> - <scope>runtime</scope> + <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>commons-logging</groupId> diff --git a/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java b/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java index 68ea24b..d741993 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java +++ b/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java @@ -31,8 +31,8 @@ public enum DocumentsEnum { ENTRY_BOOKS(t("lima-business.document.entrybook"), "lima_entrybooks"), FINANCIAL_STATEMENT(t("lima-business.document.financialstatement"), "lima_financialstatements"), GENERAL_ENTRY_BOOK(t("lima-business.document.generalentrybook"), "lima_general_entybook"), - LEDGER(t("lima-business.document.ledger"), "lima_ledger"); -// VAT(t("lima-business.document.vat"), "lima_vat"), + LEDGER(t("lima-business.document.ledger"), "lima_ledger"), + VAT(t("lima-business.document.vat"), "lima_vat"); private final String fileName; diff --git a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java index 00b00b8..3186ae1 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java +++ b/lima-report/src/main/java/org/chorem/lima/report/LimaReportConfig.java @@ -106,11 +106,28 @@ public class LimaReportConfig { return result; } + public File getReportsDir() { + String reportsDirPath = config.getOption(ReportConfigOption.REPORTS_DIR.getKey()); + File result = new File(reportsDirPath); + return result; + } + public void setReportsModelDir(String url) { config.setOption(ReportConfigOption.REPORTS_MODEL_DIR.key, url); config.saveForUser(); } + public String getVatPDFUrl() { + String vatPDFUrl = config.getOption(ReportConfigOption.VAT_PDF_URL.getKey()); + return vatPDFUrl; + } + + public void setVatPDFUrl(String url) { + config.setOption(ReportConfigOption.VAT_PDF_URL.key, url); + config.saveForUser(); + } + + public String getAccountReportModelPath() { String vatPDFUrl = config.getOption(ReportConfigOption.ACCOUNT_DOCUMENT_REPORT_MODEL_PATH.getKey()); return vatPDFUrl; @@ -336,6 +353,7 @@ public class LimaReportConfig { DATA_DIR("lima.data.dir", n("lima.config.data.dir.description"), "${user.home}/.lima", File.class, false, false), REPORTS_MODEL_DIR("lima.reports.dir",n("lima.config.reports.dir.description"),"${lima.data.dir}/reports", File.class, false, false), + REPORTS_DIR("lima.reports.dir", n("lima.config.reports.dir.description"), "${lima.data.dir}/reports", File.class, false, false), ACCOUNT_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.account.documentReportModelPath", n("lima.config.documentReport.account.documentReportModelPath.description"), "/jasperreports/account/DocumentReport.jrxml",String.class, false, false), ACCOUNT_ENTRY_REPORT_MODEL_PATH("lima.config.documentReport.account.accountEntryReportModelPath", n("lima.config.documentReport.account.accountEntryReportModelPath.description"), "/jasperreports/account/AccountEntry.jrxml",String.class, false, false), @@ -355,7 +373,9 @@ public class LimaReportConfig { GENERAL_LEDGER_DOCUMENT_REPORT_MODEL_PATH("lima.config.documentReport.generalLedger.documentReportModelPath", n("lima.config.documentReport.generalLedger.documentReportModelPath.description"), "/jasperreports/generalLedger/DocumentReport.jrxml", String.class, false, false), GENERAL_LEDGER_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerModelPath", n("lima.config.documentReport.generalLedger.generalLedgerModelPath.description"), "/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"), "/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml", String.class, false, false); + GENERAL_LEDGER_ENTRY_MODEL_PATH("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath", n("lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description"), "/jasperreports/generalLedger/GeneralLedgerEntryReport.jrxml", String.class, false, false), + + VAT_PDF_URL("lima.report.vatpdfurl", n("lima.config.reportvatpdfurl.description"), "default", String.class, false, false); private final String key; diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 4821c7f..982a34e 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -24,10 +24,14 @@ package org.chorem.lima.report.service; import com.google.common.base.Strings; import com.google.common.collect.Lists; +import com.itextpdf.text.pdf.AcroFields; +import com.itextpdf.text.pdf.PdfReader; import net.sf.jasperreports.engine.JasperReport; 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.DocumentReport; import org.chorem.lima.beans.FinancialStatementAmounts; @@ -36,6 +40,7 @@ import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.OptionsService; +import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.business.api.report.AccountReportService; import org.chorem.lima.business.api.report.BalanceReportService; import org.chorem.lima.business.api.report.GeneralEntryBookReportService; @@ -44,11 +49,14 @@ import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; import org.chorem.lima.business.utils.BigDecimalToString; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Identity; +import org.chorem.lima.entity.VatStatement; import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; import org.nuiton.util.FileUtil; import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -57,6 +65,7 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; +import java.util.Set; import static org.nuiton.i18n.I18n.t; @@ -81,6 +90,8 @@ public class DocumentService { protected AccountService accountService; + protected VatStatementService vatStatementService; + protected JasperReports jasperReports; protected String accountFilePath; @@ -88,6 +99,7 @@ public class DocumentService { protected String generalEntryBookReportPdfFilePath; protected String entryBooksReportPdfFilePath; protected String ledgerReportPdfFilePath; + protected String vat_default_formFilePath; public DocumentService() { identityService = LimaServiceFactory.getService(IdentityService.class); @@ -99,6 +111,7 @@ public class DocumentService { generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); ledgerReportService = LimaServiceFactory.getService(LedgerReportService.class); + vatStatementService = LimaServiceFactory.getService(VatStatementService.class); jasperReports = new JasperReports(); @@ -119,6 +132,7 @@ public class DocumentService { generalEntryBookReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.GENERAL_ENTRY_BOOK.getFileName() + ".pdf"; entryBooksReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.ENTRY_BOOKS.getFileName() + ".pdf"; ledgerReportPdfFilePath = reportDirPath + File.separator + DocumentsEnum.LEDGER.getFileName() + ".pdf"; + vat_default_formFilePath = reportDirPath + File.separator + DocumentsEnum.VAT.getFileName() + ".pdf"; if (log.isDebugEnabled()) { log.debug("Path : " + reportDirPath); @@ -262,79 +276,81 @@ 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().getReportsModelDir().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 path = LimaReportConfig.getInstance().getReportsDir().getAbsolutePath(); + String filePath = path + File.separator + + DocumentsEnum.VAT.getFileName() + ".pdf"; + + PDDocument doc; + InputStream reportsStream; + + String vatPDFUrl = LimaReportConfig.getInstance().getVatPDFUrl(); + + AcroFields pdfFields; + if (vatPDFUrl.equals("default")) { + reportsStream = DocumentService.class.getResourceAsStream("/reports/vat_form_fr.pdf"); + try { + PdfReader reader = new PdfReader("/reports/vat_form_fr.pdf"); + pdfFields = reader.getAcroFields(); + Set<String> fldNames = pdfFields.getFields().keySet(); + + } catch (IOException e) { + e.printStackTrace(); + } + if (reportsStream == null) { + throw new LimaTechnicalException("Could not find such file " + + "/reports/vat_form_fr.pdf"); + } + } else { + try { + reportsStream = new FileInputStream(vat_default_formFilePath); + } catch (FileNotFoundException eee) { + throw new LimaTechnicalException("Could not find such file " + + vat_default_formFilePath, 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); + } + } protected String constructHtmlHeader(String title) { @@ -349,38 +365,6 @@ public class DocumentService { return head; } - protected String constructSubTitleHtml(String subTitle) { - return "\t<h2>" + subTitle + "</h2>\n"; - } - - protected String constructSubTitleHtml(String subTitleFirstpart, String subTitleSecPart) { - String subTitle = "\t<h2>\n" + - subTitleFirstpart + - "<br/>\n" + - subTitleSecPart + - "</h2>\n"; - - return subTitle; - } - - protected String constructTableHeader(String... columnsNames) { - StringBuilder builder = new StringBuilder("\t\t<thead>\n\t\t\t<tr>\n"); - for (String name : columnsNames) { - builder.append("\t\t\t\t<th>").append(name).append("</th>\n"); - } - builder.append("\t\t\t</tr>\t\t\n</thead>\n"); - return builder.toString(); - } - - protected String constructTableLine(String[] cells, boolean even) { - String style = even ? "line_even" : "line_odd"; - StringBuilder builder = new StringBuilder("\t\t<tr class=\"" + style + "\">\n"); - for (String cell : cells) { - builder.append("\t\t\t<td>").append(cell).append("</td>\n"); - } - builder.append("\t\t</tr>\n"); - return builder.toString(); - } protected String constructTableLine(String... cells) { StringBuilder builder = new StringBuilder("\t\t<tr>\n"); @@ -525,7 +509,7 @@ public class DocumentService { return inputStream; } - public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account) throws IOException { + public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account, String autocomplete) throws IOException { String stringResult = null; //create docs @@ -548,6 +532,12 @@ public class DocumentService { case LEDGER: createLedgerDocuments(beginDate, endDate); break; + case VAT: + if (log.isDebugEnabled()) { + log.debug("autocomplete : " + autocomplete); + } + createVatDocuments(beginDate, endDate, autocomplete); + break; default: throw new UnsupportedOperationException("Unknown document type: " + model); } diff --git a/lima-report/src/main/resources/reports/vat_form_fr.pdf b/lima-report/src/main/resources/reports/vat_form_fr.pdf index b169a66..395f8d6 100644 Binary files a/lima-report/src/main/resources/reports/vat_form_fr.pdf and b/lima-report/src/main/resources/reports/vat_form_fr.pdf differ diff --git a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java index 1581ffa..127a6b5 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java +++ b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java @@ -139,13 +139,14 @@ public class HttpServerService { String beginDate = req.getParameter("beginDate"); String endDate = req.getParameter("endDate"); String account = (StringUtils.isBlank(req.getParameter("account")) ? null : URLDecoder.decode(req.getParameter("account"), "UTF-8")); + String autocomplete = req.getParameter("autocomplete") == null ? "true" : req.getParameter("autocomplete"); if (imageParam != null) { // render image doImage(resp, imageParam); } else if (model != null && beginDate != null && endDate != null) { // generate and render report - doCreateReport(resp, model, beginDate, endDate, account); + doCreateReport(resp, model, beginDate, endDate, account, autocomplete); } else { // render home HTML doHomeHtml(req, resp); @@ -167,7 +168,7 @@ public class HttpServerService { } protected void doCreateReport(HttpServletResponse resp, String model, String beginDate, String endDate, - String account) throws IOException { + String account, String autocomplete) throws IOException { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); @@ -177,7 +178,7 @@ public class HttpServerService { Date endDateFormat = sdf.parse(endDate); GeneratedReport generatedReport = - documentService.createReport(beginDateFormat, endDateFormat, model, account); + documentService.createReport(beginDateFormat, endDateFormat, model, account, autocomplete); if (Strings.isNullOrEmpty(generatedReport.getHtmlContent())) { InputStream in = generatedReport.getPdfStream(); diff --git a/lima-swing/src/main/resources/import/vat_base.csv b/lima-swing/src/main/resources/import/vat_base.csv index 7fafb1e..48bb9ee 100644 --- a/lima-swing/src/main/resources/import/vat_base.csv +++ b/lima-swing/src/main/resources/import/vat_base.csv @@ -1,56 +1,59 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Acquisitions intracommunautaires;N;;b4.b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Livraisons de gaz naturel ou d'électricité imposables en France;N;;b5.b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b6.b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Régularisations (imposables);N;;b7.b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -"Ventes, prestations de services";N;;b1.b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -B. DECOMPTE DE LA TVA A PAYER;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services" -TVA BRUTE;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER" -Opérations réalisées en France métropolitaine;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -"Taux normal 19,6% (Base hors taxe)";N;;b15.b15;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux normal 19,6% (Taxe due)";N;;b23.b23;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux réduit 5,5% (Base hors taxe)";N;;b16.b16;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux réduit 5,5% (Taxe due)";N;;b24.b24;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -Opérations réalisées dans les DOM;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -"Taux normal 8,5% (Base hors taxe)";N;;b18.b18;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux normal 8,5% (Taxe due)";N;;b26.b26;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux réduit 2,1% (Base hors taxe)";N;;b19.b19;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux réduit 2,1% (Taxe due)";N;;b27.b27;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -Opérations imposables à un autre taux (France métropolitaine ou DOM);O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Ancien taux (Base hors taxe);N;;b21.b21;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Ancien taux (Taxe due);N;;b29.b29;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Opérations imposables à un taux particulier (Base hors taxe);N;;b22.b22;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Opérations imposables à un taux particulier (Taxe due);N;;b30.b30;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -TVA antérieurement déduite à reverser;N;;b31.b31;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Total de le TVA brute due;N;;b32.b32;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Dont TVA sur acquisitions intracommunautaires;N;;b33.b33;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Dont TVA sur opérations à destination de Monaco;N;;b34.b34;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -TVA DEDUCTIBLE;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER" -Biens constituant des immobilisations;N;;b35.b35;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autres biens et services;N;;b36.b36;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autre TVA à déduire;N;;b37.b37;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b38.b38;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Total TVA déductible;N;;total1.total1;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b39.b39;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autres opérations imposables;N;;b2.b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -CREDIT;O;;;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables -Crédit de TVA;N;;b40.b40;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Remboursement demandé sur formulaire n°3519;N;;b41.b41;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Crédit à reporter;N;;b42.b42;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Achats de prestations de services intracommunautaires;N;;b3.b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -TAXE A PAYER;O;;;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires -TVA nette due;N;;b43.b43;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -Taxes assimilées calculées sur annexe n°3310 A;N;;b44.b44;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -"Sommes à imputer, exprimées en euros, y compris acompte congés";N;;b45.b45;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -"Sommes à ajouter, exprimées en euros, y compris acompte congés";N;;b46.b46;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -Total à payer;N;;b47.b47;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER +Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Acquisitions intracommunautaires;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Régularisations (imposables);N;;b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) OPERATIONS NON IMPOSABLES;O;;;A. MONTANT DES OPERATIONS REALISEES -Exportations hors CE;N;;b8.b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Autres opérations non imposables;N;;b9.b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Livraisons intracommunautaires;N;;b10.b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Livraisons de gaz naturel ou d'électricité non imposables en France;N;;b11.b11;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Achats de franchise;N;;b12.b12;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France;N;;b13.b13;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Régularisations (non imposables);N;;b14.b14;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Exportations hors CE;N;;b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Autres opérations non imposables;N;;b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Livraisons intracommunautaires;N;;b11;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid non imposables en France;N;;b12;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Achats de franchise;N;;b13;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France;N;;b14;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Régularisations (non imposables);N;;b15;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +B. DECOMPTE DE LA TVA A PAYER;O;;; +TVA BRUTE;O;;;B. DECOMPTE DE LA TVA A PAYER +Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux réduit 2,1% (Base hors taxe);N;;b24;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux réduit 2,1% (Taxe due);N;;b25;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Opérations imposables à un autre taux (France métropolitaine ou DOM);O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Ancien taux (Base hors taxe);N;;b28;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Ancien taux (Taxe due);N;;b29;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Opérations imposables à un taux particulier (Base hors taxe);N;;b30;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Opérations imposables à un taux particulier (Taxe due);N;;b31;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +TVA antérieurement déduite à reverser;N;;b32;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Sommes à ajouter, y compris acompte congés (exprimées en euro).;N;;b33;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Total de le TVA brute due (lignes 08 à 5B);N;;b34;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER +Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER +Crédit de TVA (ligne 23 – ligne 16).;N;;b44;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Remboursement de crédit demandé sur formulaire n°3519 joint;N;;b45;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Crédit de TVA transféré à la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b46;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Crédit à reporter ( ligne 25 – ligne 26 – ligne AA );N;;b47;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER +TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER diff --git a/lima-swing/src/main/resources/import/vat_default.csv b/lima-swing/src/main/resources/import/vat_default.csv index 1735d1d..70f92ee 100644 --- a/lima-swing/src/main/resources/import/vat_default.csv +++ b/lima-swing/src/main/resources/import/vat_default.csv @@ -1,56 +1,59 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Acquisitions intracommunautaires;N;;b4.b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Livraisons de gaz naturel ou d'électricité imposables en France;N;;b5.b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b6.b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Régularisations (imposables);N;;b7.b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -"Ventes, prestations de services";N;;b1.b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -B. DECOMPTE DE LA TVA A PAYER;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services" -TVA BRUTE;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER" -Opérations réalisées en France métropolitaine;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -"Taux normal 19,6% (Base hors taxe)";N;;b15.b15;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux normal 19,6% (Taxe due)";N;;b23.b23;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux réduit 5,5% (Base hors taxe)";N;;b16.b16;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -"Taux réduit 5,5% (Taxe due)";N;;b24.b24;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine" -Opérations réalisées dans les DOM;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -"Taux normal 8,5% (Base hors taxe)";N;;b18.b18;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux normal 8,5% (Taxe due)";N;;b26.b26;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux réduit 2,1% (Base hors taxe)";N;;b19.b19;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -"Taux réduit 2,1% (Taxe due)";N;;b27.b27;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM" -Opérations imposables à un autre taux (France métropolitaine ou DOM);O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Ancien taux (Base hors taxe);N;;b21.b21;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Ancien taux (Taxe due);N;;b29.b29;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Opérations imposables à un taux particulier (Base hors taxe);N;;b22.b22;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -Opérations imposables à un taux particulier (Taxe due);N;;b30.b30;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM)" -TVA antérieurement déduite à reverser;N;;b31.b31;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Total de le TVA brute due;N;;b32.b32;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Dont TVA sur acquisitions intracommunautaires;N;;b33.b33;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -Dont TVA sur opérations à destination de Monaco;N;;b34.b34;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE" -TVA DEDUCTIBLE;O;;;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER" -Biens constituant des immobilisations;N;;b35.b35;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autres biens et services;N;;b36.b36;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autre TVA à déduire;N;;b37.b37;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b38.b38;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Total TVA déductible;N;;total1.total1;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b39.b39;"A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Ventes, prestations de services/B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE" -Autres opérations imposables;N;;b2.b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -CREDIT;O;;;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables -Crédit de TVA;N;;b40.b40;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Remboursement demandé sur formulaire n°3519;N;;b41.b41;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Crédit à reporter;N;;b42.b42;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Autres opérations imposables/CREDIT -Achats de prestations de services intracommunautaires;N;;b3.b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -TAXE A PAYER;O;;;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires -TVA nette due;N;;b43.b43;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -Taxes assimilées calculées sur annexe n°3310 A;N;;b44.b44;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -"Sommes à imputer, exprimées en euros, y compris acompte congés";N;;b45.b45;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -"Sommes à ajouter, exprimées en euros, y compris acompte congés";N;;b46.b46;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER -Total à payer;N;;b47.b47;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.)/Achats de prestations de services intracommunautaires/TAXE A PAYER +Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Acquisitions intracommunautaires;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Régularisations (imposables);N;;b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) OPERATIONS NON IMPOSABLES;O;;;A. MONTANT DES OPERATIONS REALISEES -Exportations hors CE;N;;b8.b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Autres opérations non imposables;N;;b9.b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Livraisons intracommunautaires;N;;b10.b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Livraisons de gaz naturel ou d'électricité non imposables en France;N;;b11.b11;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Achats de franchise;N;;b12.b12;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France;N;;b13.b13;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES -Régularisations (non imposables);N;;b14.b14;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES \ No newline at end of file +Exportations hors CE;N;;b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Autres opérations non imposables;N;;b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Livraisons intracommunautaires;N;;b11;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid non imposables en France;N;;b12;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Achats de franchise;N;;b13;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Ventes de biens ou prestations de services réalisées aurpès d'un assujetti non établi en France;N;;b14;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +Régularisations (non imposables);N;;b15;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES +B. DECOMPTE DE LA TVA A PAYER;O;;; +TVA BRUTE;O;;;B. DECOMPTE DE LA TVA A PAYER +Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux réduit 2,1% (Base hors taxe);N;;b24;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Taux réduit 2,1% (Taxe due);N;;b25;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM +Opérations imposables à un autre taux (France métropolitaine ou DOM);O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE +Ancien taux (Base hors taxe);N;;b28;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Ancien taux (Taxe due);N;;b29;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Opérations imposables à un taux particulier (Base hors taxe);N;;b30;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Opérations imposables à un taux particulier (Taxe due);N;;b31;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +TVA antérieurement déduite à reverser;N;;b32;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Sommes à ajouter, y compris acompte congés (exprimées en euro).;N;;b33;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Total de le TVA brute due (lignes 08 à 5B);N;;b34;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) +TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER +Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER +Crédit de TVA (ligne 23 – ligne 16).;N;;b44;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Remboursement de crédit demandé sur formulaire n°3519 joint;N;;b45;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Crédit de TVA transféré à la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b46;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +Crédit à reporter ( ligne 25 – ligne 26 – ligne AA );N;;b47;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT +TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER +TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER +Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER \ No newline at end of file diff --git a/pom.xml b/pom.xml index 32a10b7..618b24a 100644 --- a/pom.xml +++ b/pom.xml @@ -603,6 +603,12 @@ <version>${launch4jPluginVersion}</version> </dependency> + <dependency> + <groupId>com.itextpdf</groupId> + <artifactId>itextpdf</artifactId> + <version>5.5.1</version> + </dependency> + </dependencies> </dependencyManagement> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit dedb5b9517d25302a35dc92a8be287b3596dd678 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 22 10:18:41 2015 +0200 refs #1241 mise à jour du plan de TVA --- lima-swing/src/main/resources/import/vat_default.csv | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lima-swing/src/main/resources/import/vat_default.csv b/lima-swing/src/main/resources/import/vat_default.csv index 70f92ee..4da2dfb 100644 --- a/lima-swing/src/main/resources/import/vat_default.csv +++ b/lima-swing/src/main/resources/import/vat_default.csv @@ -23,7 +23,9 @@ Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PA Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b19;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Base hors taxe);N;;b20;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Taxe due);N;;b21;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM @@ -45,6 +47,8 @@ Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA D Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Sommes à imputer, y compris acompte congés (exprimées en euro);N;;b42;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Indiquer ici le coefficient de taxation forfaitaire;N;;taux;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER @@ -56,4 +60,4 @@ TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER -Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER \ No newline at end of file +Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 9a297abd96f72ce21857cec80d89618097081050 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 23 18:47:02 2015 +0200 refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA --- .../chorem/lima/business/api/TreasuryService.java | 13 + .../lima/business/ejb/TreasuryServiceImpl.java | 69 ++++++ .../lima/business/ejb/csv/IdentityModel.java | 4 +- .../resources/i18n/lima-business_fr_FR.properties | 2 + .../V0_8_6_0__1241_create_table_TREASURY.sql | 54 ++++ .../src/main/xmi/lima-callao-model.properties | 2 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 59242 -> 60092 bytes .../lima/report/service/DocumentService.java | 63 +++-- .../java/org/chorem/lima/ui/MainViewHandler.java | 13 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 149 +++++++++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 274 ++++++++++++++------- .../chorem/lima/ui/identity/IdentityHandler.java | 32 ++- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 95 ++++++- .../lima/ui/opening/CreateIdentityPanel.jaxx | 105 +++++++- .../ui/opening/CreateIdentityPanelHandler.java | 16 +- .../resources/i18n/lima-swing_en_GB.properties | 13 + .../resources/i18n/lima-swing_fr_FR.properties | 15 +- .../src/main/resources/import/vat_default.csv | 4 +- 18 files changed, 736 insertions(+), 187 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java new file mode 100644 index 0000000..4551d55 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java @@ -0,0 +1,13 @@ +package org.chorem.lima.business.api; + +import org.chorem.lima.entity.Treasury; + +/** + * Created by davidcosse on 22/07/15. + */ +public interface TreasuryService { + + Treasury getTreasury(); + + Treasury updateTreasury(Treasury treasury); +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java new file mode 100644 index 0000000..3a7cf26 --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java @@ -0,0 +1,69 @@ +package org.chorem.lima.business.ejb; + +import com.google.common.base.Preconditions; +import org.chorem.lima.business.api.TreasuryService; +import org.chorem.lima.entity.Treasury; +import org.chorem.lima.entity.TreasuryTopiaDao; +import org.nuiton.util.beans.Binder; +import org.nuiton.util.beans.BinderFactory; + +import javax.ejb.Remote; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.util.List; + +/** + * Created by davidcosse on 22/07/15. + */ +@Stateless +@Remote(TreasuryService.class) +@TransactionAttribute +public class TreasuryServiceImpl extends AbstractLimaService implements TreasuryService { + + @Override + public Treasury getTreasury() { + Treasury treasury; + + TreasuryTopiaDao dao = getDaoHelper().getTreasuryDao(); + List<Treasury> treasuries = dao.findAll(); + if (treasuries.size() == 0) { + treasury = dao.create( + Treasury.PROPERTY_ADDRESS, "", + Treasury.PROPERTY_ZIP_CODE, "", + Treasury.PROPERTY_CITY, "", + Treasury.PROPERTY_SYSTEM_TYPE, "", + Treasury.PROPERTY_DOSSIER_NUMBER, "", + Treasury.PROPERTY_KEY, "", + Treasury.PROPERTY_CDI, "", + Treasury.PROPERTY_SERVICE_CODE, "" + ); + } else { + treasury = treasuries.get(0); + } + return treasury; + } + + @Override + public Treasury updateTreasury(Treasury treasury) { + Preconditions.checkArgument(treasury != null); + + Treasury originalTreasury = getTreasury(); + + bindData(treasury, originalTreasury); + + Treasury updatedTreasury = doUpdate(originalTreasury); + + return updatedTreasury; + } + + protected Treasury doUpdate(Treasury originalTreasury) { + TreasuryTopiaDao dao = getDaoHelper().getTreasuryDao(); + return dao.update(originalTreasury); + } + + protected void bindData(Treasury treasury, Treasury originalTreasury) { + Binder<Treasury, Treasury> binder = BinderFactory.newBinder(Treasury.class); + binder.copyExcluding(treasury, originalTreasury, + Treasury.PROPERTY_TOPIA_ID); + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java index 719582f..9a2a80b 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java @@ -43,7 +43,7 @@ public class IdentityModel extends AbstractLimaModel<Identity> implements Export newOptionalColumn("phoneNumber", Identity.PROPERTY_PHONE_NUMBER); newOptionalColumn("email", Identity.PROPERTY_EMAIL); newOptionalColumn("zipCode", Identity.PROPERTY_ZIP_CODE); - newOptionalColumn("vatNumber", Identity.PROPERTY_VAT_NUMBER); + //newOptionalColumn("vatNumber", Identity.PROPERTY_VAT_NUMBER); newOptionalColumn("classificationCode", Identity.PROPERTY_CLASSIFICATION_CODE); newOptionalColumn("buisinessNumber", Identity.PROPERTY_BUSINESS_NUMBER); } @@ -59,7 +59,7 @@ public class IdentityModel extends AbstractLimaModel<Identity> implements Export modelBuilder.newColumnForExport("phoneNumber", Identity.PROPERTY_PHONE_NUMBER); modelBuilder.newColumnForExport("email", Identity.PROPERTY_EMAIL); modelBuilder.newColumnForExport("zipCode", Identity.PROPERTY_ZIP_CODE); - modelBuilder.newColumnForExport("vatNumber", Identity.PROPERTY_VAT_NUMBER); + //modelBuilder.newColumnForExport("vatNumber", Identity.PROPERTY_VAT_NUMBER); modelBuilder.newColumnForExport("classificationCode", Identity.PROPERTY_CLASSIFICATION_CODE); modelBuilder.newColumnForExport("buisinessNumber", Identity.PROPERTY_BUSINESS_NUMBER); return (Iterable) modelBuilder.getColumnsForExport(); 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 778321c..da69ed6 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 @@ -39,7 +39,9 @@ lima-business.document.society=Nom lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur +lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA +lima-business.document.vatPeriod1=%1$tM %1$tY lima-business.document.vatnumber=N° TVA lima-business.document.voucher=Pièce comptable lima-business.document.zipcode=Code postal diff --git a/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql b/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql new file mode 100644 index 0000000..644dddd --- /dev/null +++ b/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql @@ -0,0 +1,54 @@ +--- +-- #%L +-- Lima :: callao +-- %% +-- Copyright (C) 2008 - 2015 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% +--- + -- migration Lima data base from 0.6 to 0.8.6 + +-- migration from h2 to 1.3.166 not supporting index on clob +--CREATE TABLE TREASURY ( +-- TOPIAID varchar (255), +-- TOPIAVERSION bigint(19), +-- TOPIACREATEDATE timestamp(23), +-- ADDRESS varchar (255), +-- ADDRESS2 varchar (255), +-- CDI varchar (2), +-- CITY varchar (30), +-- KEY varchar (2), +-- SERVICECODE varchar (3), +-- SIE varchar (7), +-- SYSTEMTYPE varchar (3), +-- VATNUMBER varchar (6), +-- ZIPCODE varchar (5) +--); +CREATE TABLE TREASURY ( + TOPIAID varchar (255), + TOPIAVERSION bigint(19), + TOPIACREATEDATE timestamp(23), + DOSSIERNUMBER varchar (30), + ADDRESS varchar (255), + ADDRESS2 varchar (255), + ZIPCODE varchar (30), + CITY varchar (30), + CDI varchar (30), + KEY varchar (30), + SERVICECODE varchar (30), + SIE varchar (30), + SYSTEMTYPE varchar (30) +); \ No newline at end of file diff --git a/lima-callao/src/main/xmi/lima-callao-model.properties b/lima-callao/src/main/xmi/lima-callao-model.properties index c8a2519..88531f1 100644 --- a/lima-callao/src/main/xmi/lima-callao-model.properties +++ b/lima-callao/src/main/xmi/lima-callao-model.properties @@ -21,7 +21,7 @@ ### # Precise l'entete de l'ensemble des fichiers generes model.tagvalue.copyright=/*\n Copyright (C) 2009-2012 Lima Callao\n */ -model.tagvalue.version=0.6 +model.tagvalue.version=0.8.6.0 model.tagvalue.constantPrefix=PROPERTY_ model.tagValue.notGenerateToString=true model.tagValue.hibernateAttributeType.String=text diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 8633e8e..4bb153c 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 982a34e..40ef663 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -24,8 +24,6 @@ package org.chorem.lima.report.service; import com.google.common.base.Strings; import com.google.common.collect.Lists; -import com.itextpdf.text.pdf.AcroFields; -import com.itextpdf.text.pdf.PdfReader; import net.sf.jasperreports.engine.JasperReport; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -40,6 +38,7 @@ import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.OptionsService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.business.api.report.AccountReportService; import org.chorem.lima.business.api.report.BalanceReportService; @@ -49,6 +48,7 @@ import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; import org.chorem.lima.business.utils.BigDecimalToString; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Identity; +import org.chorem.lima.entity.Treasury; import org.chorem.lima.entity.VatStatement; import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; @@ -65,7 +65,6 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Set; import static org.nuiton.i18n.I18n.t; @@ -74,21 +73,23 @@ public class DocumentService { protected static final Log log = LogFactory.getLog(DocumentService.class); - private IdentityService identityService; - - private FinancialStatementService financialStatementService; + protected AccountService accountService; protected AccountReportService accountReportService; protected BalanceReportService balanceReportService; + protected ProvisionalEntryBookReportService entryBookReportService; + + protected FinancialStatementService financialStatementService; + protected GeneralEntryBookReportService generalEntryBookReportService; - protected ProvisionalEntryBookReportService entryBookReportService; + protected IdentityService identityService; protected LedgerReportService ledgerReportService; - protected AccountService accountService; + protected TreasuryService treasuryService; protected VatStatementService vatStatementService; @@ -102,14 +103,15 @@ public class DocumentService { protected String vat_default_formFilePath; public DocumentService() { - identityService = LimaServiceFactory.getService(IdentityService.class); - financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); accountService = LimaServiceFactory.getService(AccountService.class); - accountReportService = LimaServiceFactory.getService(AccountReportService.class); balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); - generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); + financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); + generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); + ledgerReportService = LimaServiceFactory.getService(LedgerReportService.class); vatStatementService = LimaServiceFactory.getService(VatStatementService.class); @@ -289,20 +291,10 @@ public class DocumentService { String vatPDFUrl = LimaReportConfig.getInstance().getVatPDFUrl(); - AcroFields pdfFields; if (vatPDFUrl.equals("default")) { reportsStream = DocumentService.class.getResourceAsStream("/reports/vat_form_fr.pdf"); - try { - PdfReader reader = new PdfReader("/reports/vat_form_fr.pdf"); - pdfFields = reader.getAcroFields(); - Set<String> fldNames = pdfFields.getFields().keySet(); - - } catch (IOException e) { - e.printStackTrace(); - } if (reportsStream == null) { - throw new LimaTechnicalException("Could not find such file " - + "/reports/vat_form_fr.pdf"); + throw new LimaTechnicalException("Could not find such file " + "/reports/vat_form_fr.pdf"); } } else { try { @@ -340,6 +332,25 @@ public class DocumentService { fields.setField(doc, vatStatement.getBoxName(), amount.toString()); } } + + Identity identity = identityService.getIdentity(); + Treasury treasury = treasuryService.getTreasury(); + + String ident = identity.getName() + "\n" + identity.getAddress() + "\n" + identity.getAddress2() + "\n" + identity.getZipCode() + " " + identity.getCity(); + String treasuryAddress = treasury.getAddress() + '\n' + treasury.getZipCode() + " " + treasury.getCity(); + + fields.setField(doc, "a1", t("lima-business.document.vatPeriod1", beginDate)); + fields.setField(doc, "a2", treasuryAddress); + fields.setField(doc, "a4", ident); + fields.setField(doc, "a6", treasury.getSie()); + fields.setField(doc, "a7", treasury.getDossierNumber()); + fields.setField(doc, "a8", treasury.getKey()); + fields.setField(doc, "a9", t("lima-business.document.treasuryPeriod", beginDate)); + fields.setField(doc, "a10", treasury.getCdi()); + fields.setField(doc, "a11", treasury.getServiceCode()); + fields.setField(doc, "a12", treasury.getSystemType()); + fields.setField(doc, "a13", "FR" + identity.getVatNumber() + identity.getBusinessNumber()); + } } @@ -425,9 +436,9 @@ public class DocumentService { boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"}; headerTitle += constructTableLine(columnsClassifCode); - String[] columnsVatNumber = {boldItalicBegin + t("lima-business.document.vatnumber") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>",}; - headerTitle += constructTableLine(columnsVatNumber); +// String[] columnsVatNumber = {boldItalicBegin + t("lima-business.document.vatnumber") + boldItalicEnd, +// "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>",}; +// headerTitle += constructTableLine(columnsVatNumber); } String[] columnsPeriodOne = {boldItalicBegin + t("lima-business.document.period1") + boldItalicEnd, "<i>" diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java index 8b53397..2d1d1e4 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java @@ -52,19 +52,12 @@ import org.chorem.lima.ui.vatchart.VatChartView; import org.nuiton.util.DesktopUtil; import org.nuiton.widget.SwingSession; -import javax.swing.DefaultCellEditor; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JEditorPane; -import javax.swing.JScrollPane; -import javax.swing.JTabbedPane; -import javax.swing.UIManager; +import javax.swing.*; import javax.swing.border.LineBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.BorderUIResource; -import java.awt.Component; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -554,7 +547,7 @@ public class MainViewHandler { boolean canClose) { final JTabbedPane contentTabbedPane = ui.getContentTabbedPane(); - // if contentTabbedPane doesnot yet contains tab + // if contentTabbedPane does not yet contains tab if (contentTabbedPane.indexOfTab(name) == -1) { ClosableTabHeader closableHeader = new ClosableTabHeader(); closableHeader.setTitle(name); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index 8675205..c46af39 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -30,7 +30,7 @@ } #nameTextField { - text : {handler.getIdentity().getName()}; + text : {identity.getName()}; columns : 20; } @@ -39,8 +39,9 @@ } #descriptionTextField { - text : {handler.getIdentity().getDescription()}; + text : {identity.getDescription()}; columns : 30; + rows : 5; } #addressLabel { @@ -48,13 +49,9 @@ } #addressTextField { - text : {handler.getIdentity().getAddress()}; - columns : 30; -} - -#address2TextField { - text : {handler.getIdentity().getAddress2()}; + text : {identity.getAddress()}; columns : 30; + rows : 5; } #zipCodeLabel { @@ -62,7 +59,7 @@ } #zipCodeTextField { - text : {handler.getIdentity().getZipCode()}; + text : {identity.getZipCode()}; columns : 5; } @@ -71,7 +68,7 @@ } #cityTextField { - text : {handler.getIdentity().getCity()}; + text : {identity.getCity()}; columns : 20; } @@ -80,16 +77,7 @@ } #businessNumberTextField { - text : {handler.getIdentity().getBusinessNumber()}; - columns : 20; -} - -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; + text : {identity.getBusinessNumber()}; columns : 20; } @@ -98,7 +86,7 @@ } #classificationCodeTextField { - text : {handler.getIdentity().getClassificationCode()}; + text : {identity.getClassificationCode()}; columns : 5; } @@ -107,7 +95,7 @@ } #phoneNumberTextField { - text : {handler.getIdentity().getPhoneNumber()}; + text : {identity.getPhoneNumber()}; columns : 20; } @@ -116,10 +104,123 @@ } #emailTextField { - text : {handler.getIdentity().getEmail()}; + text : {identity.getEmail()}; columns : 20; } +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {identity.getVatNumber()}; + columns : 2; +} + +#treasuryAddressLabel { + text : "lima.treasury.address"; +} + +#treasuryAddressTextField { + text : {treasury.getAddress()}; + columns : 30; + rows : 5; +} + +#treasuryAddress2Label { + text : "lima.treasury.address2"; +} + +#address2TextField { + text : {treasury.getAddress2()}; + columns : 30; +} + +#treasuryZipCodeLabel { + text : "lima.treasury.zipCode"; +} + +#treasuryZipCodeTextField { + text : {treasury.getZipCode()}; + columns : 5; +} + +#treasuryCityLabel { + text : "lima.treasury.city"; +} + +#treasuryCityTextField { + text : {treasury.getCity()}; + columns : 20; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySystemTypeTextField { + text : {treasury.getSystemType()}; + columns : 3; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySieTextField { + text : {treasury.getSie()}; + columns : 7; +} + +#treasurySieLabel { + text : "lima.treasury.sie"; +} + +#treasuryVatNumberTextField { + text : {treasury.getVatNumber()}; + columns : 6; +} + +#treasuryVatNumberLabel { + text : "lima.treasury.vatNumber"; +} + +#treasuryKeyTextField { + text : {treasury.getKey()}; + columns : 2; +} + +#treasuryKeyLabel { + text : "lima.treasury.key"; +} + +#treasuryCdiTextField { + text : {treasury.getKey()}; + columns : 2; +} + +#treasuryCdiLabel { + text : "lima.treasury.cdi"; +} + +#treasuryServiceCodeTextField { + text : {treasury.getServiceCode()}; + columns : 3; +} + +#treasuryServiceCodeLabel { + text : "lima.treasury.serviceCode"; +} + +#dossierNumberLabel { + text : "lima.treasury.dossierNumber"; +} + +#dossierNumberTextField { + text : {treasury.getDossierNumber()}; + columns : 3; +} + #cancel { text : "lima.cancel"; actionIcon : cancel; @@ -128,4 +229,4 @@ #ok { text : "lima.ok"; actionIcon : ok; -} +} \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index b050d35..9d53d7f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -27,6 +27,8 @@ <IdentityHandler id="handler" javaBean="new IdentityHandler(this)"/> <org.chorem.lima.entity.Identity id="identity" javaBean='handler.getIdentity()'/> + <org.chorem.lima.entity.Treasury id="treasury" + javaBean='handler.getTreasury()'/> <import> java.awt.Dimension </import> @@ -37,101 +39,183 @@ ]]> </script> - <Table constraints="BorderLayout.CENTER" - border="{BorderFactory.createEmptyBorder(10, 10, 10, 10)}" > - <row> - <cell anchor="east"> - <JLabel id="nameLabel" /> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="nameTextField" /> - </cell> - - <cell rows="5"> - <JPanel minimumSize="{new Dimension(20, 20)}"> - </JPanel> - </cell> - - <cell anchor="east"> - <JLabel id="phoneNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="phoneNumberTextField"/> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="descriptionLabel"/> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="descriptionTextField"/> - </cell> - - <cell anchor="east"> - <JLabel id="emailLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="emailTextField" /> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="addressLabel"/> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="addressTextField" /> - </cell> - - <cell anchor="east"> - <JLabel id="businessNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="businessNumberTextField"/> - </cell> - </row> - - <row> - <cell/> - <cell anchor="west" - columns="3"> - <JTextField id="address2TextField"/> - </cell> - - <cell anchor="east"> - <JLabel id="vatNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="vatNumberTextField"/> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="zipCodeLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="zipCodeTextField"/> - </cell> - <cell anchor="east"> - <JLabel text="lima.identity.city"/> - </cell> - <cell fill="horizontal"> - <JTextField id="cityTextField" /> - </cell> - - <cell anchor="east"> - <JLabel id="classificationCodeLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="classificationCodeTextField"/> - </cell> - </row> - </Table> + <JTabbedPane id="identityContentTabbedPane" + constraints="BorderLayout.CENTER"> + + <tab id="identityTab" title="Identité" layout='{new GridLayout(0,1)}'> + <Table id="identityTable"> + <row> + <cell anchor="east"> + <JLabel id="nameLabel" /> + </cell> + <cell anchor="west"> + <JTextField id="nameTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="phoneNumberLabel"/> + </cell> + <cell anchor="west" > + <JTextField id="phoneNumberTextField"/> + </cell> + </row> + + <row> + <cell anchor="east" rows="5"> + <JLabel id="addressLabel"/> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="addressTextField" /> + </cell> + </row> + + <row> + <cell anchor="east" rows="5"> + <JLabel id="descriptionLabel"/> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="descriptionTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="zipCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="zipCodeTextField"/> + </cell> + <cell anchor="east"> + <JLabel text="lima.identity.city"/> + </cell> + <cell anchor="west"> + <JTextField id="cityTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="emailLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="emailTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="businessNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="businessNumberTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="classificationCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="classificationCodeTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="vatNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="vatNumberTextField"/> + </cell> + </row> + + </Table> + </tab> + + <tab id="treasuryTab" title="Trésor Public" layout='{new GridLayout(0,1)}'> + <JPanel layout='{new GridLayout(0,1)}'> + <Table id="treasuryTable" layout='{new GridLayout(3,1)}'> + <row> + <cell anchor="east" rows="5"> + <JLabel id="treasuryAddressLabel" /> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="treasuryAddressTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="treasuryZipCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryZipCodeTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="treasuryCityLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryCityTextField"/> + </cell> + </row> + </Table> + + <Table layout='{new GridLayout(1,1)}'> + <row> + <cell anchor="east"> + <JLabel id="treasurySieLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasurySieTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="dossierNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="dossierNumberTextField" /> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryKeyLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryKeyTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryCdiLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryCdiTextField" /> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryServiceCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="treasurySystemTypeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasurySystemTypeTextField" /> + </cell> + </row> + </Table> + </JPanel> + </tab> + </JTabbedPane> <JPanel constraints="BorderLayout.SOUTH" layout='{new GridLayout(1,0)}'> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index f0bcc1f..c0d2e18 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -24,15 +24,19 @@ package org.chorem.lima.ui.identity; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; -import org.chorem.lima.business.LimaServiceFactory; +import org.chorem.lima.entity.Treasury; public class IdentityHandler { protected IdentityService identityService; + protected TreasuryService treasuryService; + protected IdentityForm view; private static final Log log = LogFactory.getLog(IdentityHandler.class); @@ -40,9 +44,8 @@ public class IdentityHandler { public IdentityHandler(IdentityForm view) { this.view = view; - identityService = - LimaServiceFactory.getService( - IdentityService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); } public Identity getIdentity() { @@ -53,21 +56,38 @@ public class IdentityHandler { return identity; } + public Treasury getTreasury() { + Treasury treasury = treasuryService.getTreasury(); + return treasury; + } + public void updateIdentity(){ Identity identity = getIdentity(); identity.setName(view.getNameTextField().getText()); identity.setDescription(view.getDescriptionTextField().getText()); identity.setAddress(view.getAddressTextField().getText()); - identity.setAddress2(view.getAddress2TextField().getText()); identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); + identity.setVatNumber(view.getVatNumberTextField().getText()); identityService.updateIdentity(identity); + + Treasury treasury = treasuryService.getTreasury(); + treasury.setAddress(view.getTreasuryAddressTextField().getText()); + treasury.setCdi(view.getTreasuryCdiTextField().getText()); + treasury.setCity(view.getTreasuryCityTextField().getText()); + treasury.setKey(view.getTreasuryKeyTextField().getText()); + treasury.setServiceCode(view.getTreasuryServiceCodeTextField().getText()); + treasury.setDossierNumber(view.getDossierNumberLabel().getText()); + treasury.setSie(view.getTreasurySieTextField().getText()); + treasury.setZipCode(view.getTreasuryZipCodeTextField().getText()); + treasury.setSystemType(view.getTreasurySystemTypeTextField().getText()); + + treasuryService.updateTreasury(treasury); } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index 7d8da6b..ab1c561 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -75,14 +75,6 @@ text : {handler.getIdentity().getBusinessNumber()}; } -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; -} - #classificationCodeLabel { text : "lima.identity.classificationCode"; } @@ -106,3 +98,90 @@ #emailTextField { text : {handler.getIdentity().getEmail()}; } + +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {handler.getIdentity().getVatNumber()}; +} + +#treasuryAddressLabel { + text : "lima.treasury.address"; +} + +#treasuryAddressTextField { + text : {handler.getTreasury().getAddress()}; +} + +#treasuryAddress2Label { + text : "lima.treasury.address2"; +} + +#treasuryAddress2TextField { + text : {handler.getTreasury().getAddress2()}; +} + +#treasuryCdiLabel { + text : "lima.treasury.cdi"; +} + +#treasuryCdiTextField { + text : {handler.getTreasury().getCdi()}; +} + +#treasuryCityLabel { + text : "lima.treasury.city"; +} +#treasuryCityTextField { + text : {handler.getTreasury().getCity()}; +} + +#treasuryKeyLabel { + text : "lima.treasury.key"; +} + +#treasuryKeyTextField { + text : {handler.getTreasury().getKey()}; +} + +#treasuryServiceCodeLabel { + text : "lima.treasury.serviceCode"; +} + +#treasuryServiceCodeTextField { + text : {handler.getTreasury().getServiceCode()}; +} + +#treasurySieLabel { + text : "lima.treasury.sie"; +} + +#treasurySieTextField { + text : {handler.getTreasury().getSie()}; +} + +#treasuryDossierNumberLabel { + text : "lima.treasury.dossierNumber"; +} + +#treasuryDossierNumberTextField { + text : {handler.getTreasury().getDossierNumber()}; +} + +#treasuryZipCodeLabel { + text : "lima.treasury.zipCode"; +} + +#treasuryZipCodeTextField { + text : {handler.getTreasury().getZipCode()}; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySystemTypeTextField { + text : {handler.getTreasury().getSystemType()}; +} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index d99f7f9..50235f8 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -85,14 +85,6 @@ </row> <row> <cell fill="horizontal"> - <JLabel id="vatNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="vatNumberTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> <JLabel id="classificationCodeLabel"/> </cell> <cell fill="horizontal"> @@ -115,5 +107,102 @@ <JTextField id="emailTextField" /> </cell> </row> + <row> + <cell fill="horizontal"> + <JLabel id="vatNumber"/> + </cell> + <cell fill="horizontal"> + <JTextField id="vatNumberTextField" /> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryAddressLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryAddressTextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryAddress2Label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryAddress2TextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryZipCodeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryZipCodeTextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryCityLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryCityTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasurySieLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasurySieTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryVatNumberLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryDossierNumberTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryKeyLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryKeyTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryCdiLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryCdiTextField"/> + </cell> + </row> + + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryServiceCodeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasurySystemTypeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasurySystemTypeTextField"/> + </cell> + </row> + </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 97a5f0d..830d8f9 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -24,8 +24,10 @@ package org.chorem.lima.ui.opening; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; +import org.chorem.lima.entity.Treasury; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -34,14 +36,15 @@ public class CreateIdentityPanelHandler { protected IdentityService identityService; + protected TreasuryService treasuryService; + protected CreateIdentityPanel view; public CreateIdentityPanelHandler(CreateIdentityPanel view) { this.view = view; - identityService = - LimaServiceFactory.getService( - IdentityService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); } public Identity getIdentity() { @@ -52,6 +55,11 @@ public class CreateIdentityPanelHandler { return identity; } + public Treasury getTreasury() { + Treasury treasury = treasuryService.getTreasury(); + return treasury; + } + public void updateIdentity(){ Identity identity = getIdentity(); @@ -62,7 +70,7 @@ public class CreateIdentityPanelHandler { identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - identity.setVatNumber(view.getVatNumberTextField().getText()); + //identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); 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 4c6de4d..e0fa104 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,5 @@ +Identit\\u00e9= +Tr\\u00e9sor\ Public= lima.account=Account lima.account.add=Add account (Ctrl+A) lima.account.add.error.InvalidAccountNumber=Invalid account number\:%1$s @@ -524,6 +526,17 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury.address= +lima.treasury.address2= +lima.treasury.cdi= +lima.treasury.city= +lima.treasury.dossierNumber= +lima.treasury.key= +lima.treasury.serviceCode= +lima.treasury.sie= +lima.treasury.systemType= +lima.treasury.vatNumber= +lima.treasury.zipCode= lima.update=Modify lima.update.shortcut=Update (Ctrl+M) lima.vatStatement=VAT statement chart 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 6440893..094f9ad 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,5 @@ +Identit\\u00e9= +Tr\\u00e9sor\ Public= blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.account=Compte lima.account.add=Nouveau compte (Ctrl+A) @@ -420,7 +422,7 @@ lima.identity.description=Description lima.identity.email=Courriel lima.identity.name=Nom lima.identity.phoneNumber=n° Tel -lima.identity.vatNumber=n° TVA +lima.identity.vatNumber=Numéro TVA\: FR lima.identity.zipCode=Code Postal lima.import.error=Une erreur est survenue lors de l'import lima.import.error.extractFile=Le fichier n'est correct @@ -530,6 +532,17 @@ lima.table.provisionDeprecation=Amortissements et provisions lima.table.voucher=Pièce comptable lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury=Trésor Public +lima.treasury.address=Adresse +lima.treasury.address2=Adresse (suite) +lima.treasury.cdi=CDI +lima.treasury.city=Ville +lima.treasury.dossierNumber=Numéro de dossier +lima.treasury.key=Clé +lima.treasury.serviceCode=Code service +lima.treasury.sie=SIE +lima.treasury.systemType=Régime +lima.treasury.zipCode=Code Postal lima.update=Modifier lima.update.shortcut=Modifier (Ctrl+M) lima.vatStatement=Plan TVA diff --git a/lima-swing/src/main/resources/import/vat_default.csv b/lima-swing/src/main/resources/import/vat_default.csv index 4da2dfb..96a0242 100644 --- a/lima-swing/src/main/resources/import/vat_default.csv +++ b/lima-swing/src/main/resources/import/vat_default.csv @@ -1,7 +1,7 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Ventes, prestations de services;N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) @@ -43,7 +43,7 @@ Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35 Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER -Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Biens constituant des immobilisations;N;211, 212, 213, 214;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit f56fee1b2f0b1e6c4f68e4a2f3bde6399ed40c1f Author: dcosse <cosse@codelutin.com> Date: Fri Jul 24 18:29:55 2015 +0200 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité --- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 93 +++++++++++----------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 9d53d7f..031b887 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -42,13 +42,13 @@ <JTabbedPane id="identityContentTabbedPane" constraints="BorderLayout.CENTER"> - <tab id="identityTab" title="Identité" layout='{new GridLayout(0,1)}'> - <Table id="identityTable"> + <tab id="identityTab" title="Identité"> + <Table id="identityTable" fill="both"> <row> - <cell anchor="east"> + <cell anchor="east" weightx="1"> <JLabel id="nameLabel" /> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="nameTextField" /> </cell> </row> @@ -57,27 +57,27 @@ <cell anchor="east"> <JLabel id="phoneNumberLabel"/> </cell> - <cell anchor="west" > + <cell anchor="west" columns="3"> <JTextField id="phoneNumberTextField"/> </cell> </row> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="addressLabel"/> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="addressTextField" /> </cell> </row> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="descriptionLabel"/> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="descriptionTextField"/> </cell> </row> @@ -101,7 +101,7 @@ <cell anchor="east"> <JLabel id="emailLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="emailTextField" /> </cell> </row> @@ -110,7 +110,7 @@ <cell anchor="east"> <JLabel id="businessNumberLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="businessNumberTextField"/> </cell> </row> @@ -119,7 +119,7 @@ <cell anchor="east"> <JLabel id="classificationCodeLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="classificationCodeTextField"/> </cell> </row> @@ -128,7 +128,7 @@ <cell anchor="east"> <JLabel id="vatNumberLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="vatNumberTextField"/> </cell> </row> @@ -136,15 +136,15 @@ </Table> </tab> - <tab id="treasuryTab" title="Trésor Public" layout='{new GridLayout(0,1)}'> - <JPanel layout='{new GridLayout(0,1)}'> - <Table id="treasuryTable" layout='{new GridLayout(3,1)}'> + <tab id="treasuryTab" title="Trésor Public"> + <JPanel layout="{new BorderLayout()}"> + <Table fill="both" constraints="BorderLayout.NORTH" insets="5"> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="treasuryAddressLabel" /> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="treasuryAddressTextField" /> </cell> </row> @@ -156,9 +156,6 @@ <cell anchor="west"> <JTextField id="treasuryZipCodeTextField" /> </cell> - </row> - - <row> <cell anchor="east"> <JLabel id="treasuryCityLabel"/> </cell> @@ -167,48 +164,54 @@ </cell> </row> </Table> - - <Table layout='{new GridLayout(1,1)}'> + <Table fill="both" constraints="BorderLayout.CENTER"> <row> - <cell anchor="east"> + <cell> <JLabel id="treasurySieLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasurySieTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="dossierNumberLabel"/> </cell> - <cell anchor="west"> - <JTextField id="dossierNumberTextField" /> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryKeyLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryKeyTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryCdiLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryCdiTextField" /> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryServiceCodeLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryServiceCodeTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasurySystemTypeLabel"/> </cell> - <cell anchor="west"> + </row> + <row> + <cell> + <JTextField id="treasurySieTextField"/> + </cell> + + <cell> + <JTextField id="dossierNumberTextField" /> + </cell> + + <cell> + <JTextField id="treasuryKeyTextField"/> + </cell> + + <cell> + <JTextField id="treasuryCdiTextField" /> + </cell> + + <cell> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + + <cell> <JTextField id="treasurySystemTypeTextField" /> </cell> </row> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit cfd3f21f337b317721a4c5a783c1d7edfd0a4d82 Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:15:46 2015 +0200 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider --- .../org/chorem/lima/ui/identity/IdentityForm.css | 4 ++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 4 ++-- .../chorem/lima/ui/identity/IdentityHandler.java | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 25 +++++++++++----------- .../resources/i18n/lima-swing_fr_FR.properties | 1 + 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index c46af39..ec1381b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -226,7 +226,7 @@ actionIcon : cancel; } -#ok { - text : "lima.ok"; +#validate { + text : "lima.validate"; actionIcon : ok; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 031b887..936438d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -35,7 +35,7 @@ <script> <![CDATA[ - getRootPane().setDefaultButton(ok); + getRootPane().setDefaultButton(validate); ]]> </script> @@ -224,7 +224,7 @@ layout='{new GridLayout(1,0)}'> <JButton id="cancel" onActionPerformed="dispose();"/> - <JButton id="ok" + <JButton id="validate" onActionPerformed="handler.updateIdentity(); dispose();"/> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index c0d2e18..afda4ba 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -83,7 +83,7 @@ public class IdentityHandler { treasury.setCity(view.getTreasuryCityTextField().getText()); treasury.setKey(view.getTreasuryKeyTextField().getText()); treasury.setServiceCode(view.getTreasuryServiceCodeTextField().getText()); - treasury.setDossierNumber(view.getDossierNumberLabel().getText()); + treasury.setDossierNumber(view.getDossierNumberTextField().getText()); treasury.setSie(view.getTreasurySieTextField().getText()); treasury.setZipCode(view.getTreasuryZipCodeTextField().getText()); treasury.setSystemType(view.getTreasurySystemTypeTextField().getText()); 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 e0fa104..4f79843 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 @@ -490,7 +490,7 @@ lima.quit=Exit lima.refresh=Refresh lima.refresh.shortcut=Refresh (F5) lima.remove=Remove -lima.remove.shortcut= +lima.remove.shortcut=Edit (Ctrl+M) lima.report.accounts=Accounts\: lima.report.assets=Assets lima.report.balance=Balance @@ -526,19 +526,20 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction -lima.treasury.address= -lima.treasury.address2= -lima.treasury.cdi= -lima.treasury.city= -lima.treasury.dossierNumber= -lima.treasury.key= -lima.treasury.serviceCode= -lima.treasury.sie= -lima.treasury.systemType= -lima.treasury.vatNumber= -lima.treasury.zipCode= +lima.treasury.address=Address +lima.treasury.address2=Address (next) +lima.treasury.cdi=CDI +lima.treasury.city=City +lima.treasury.dossierNumber=File number +lima.treasury.key=key +lima.treasury.serviceCode=Service Code +lima.treasury.sie=SIE +lima.treasury.systemType=Sytem Type +lima.treasury.vatNumber=VAT number +lima.treasury.zipCode=Zip Code lima.update=Modify lima.update.shortcut=Update (Ctrl+M) +lima.validate=Validate lima.vatStatement=VAT statement chart lima.vatStatement.accounts=List of accounts lima.vatStatement.base=Base VAT statement chart 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 094f9ad..ef47c97 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 @@ -545,6 +545,7 @@ lima.treasury.systemType=Régime lima.treasury.zipCode=Code Postal lima.update=Modifier lima.update.shortcut=Modifier (Ctrl+M) +lima.validate=Valider lima.vatStatement=Plan TVA lima.vatStatement.accounts=Liste des comptes lima.vatStatement.base=Standard -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 797522fb4be6b4621d5e239c17e4a937dab1ebce Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:24:55 2015 +0200 refs #1241 pas de changement dans l'interface de configuration du premier lancement --- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 95 ++----------------- .../lima/ui/opening/CreateIdentityPanel.jaxx | 105 ++------------------- .../ui/opening/CreateIdentityPanelHandler.java | 16 +--- 3 files changed, 20 insertions(+), 196 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index ab1c561..7d8da6b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -75,6 +75,14 @@ text : {handler.getIdentity().getBusinessNumber()}; } +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {handler.getIdentity().getVatNumber()}; +} + #classificationCodeLabel { text : "lima.identity.classificationCode"; } @@ -98,90 +106,3 @@ #emailTextField { text : {handler.getIdentity().getEmail()}; } - -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; -} - -#treasuryAddressLabel { - text : "lima.treasury.address"; -} - -#treasuryAddressTextField { - text : {handler.getTreasury().getAddress()}; -} - -#treasuryAddress2Label { - text : "lima.treasury.address2"; -} - -#treasuryAddress2TextField { - text : {handler.getTreasury().getAddress2()}; -} - -#treasuryCdiLabel { - text : "lima.treasury.cdi"; -} - -#treasuryCdiTextField { - text : {handler.getTreasury().getCdi()}; -} - -#treasuryCityLabel { - text : "lima.treasury.city"; -} -#treasuryCityTextField { - text : {handler.getTreasury().getCity()}; -} - -#treasuryKeyLabel { - text : "lima.treasury.key"; -} - -#treasuryKeyTextField { - text : {handler.getTreasury().getKey()}; -} - -#treasuryServiceCodeLabel { - text : "lima.treasury.serviceCode"; -} - -#treasuryServiceCodeTextField { - text : {handler.getTreasury().getServiceCode()}; -} - -#treasurySieLabel { - text : "lima.treasury.sie"; -} - -#treasurySieTextField { - text : {handler.getTreasury().getSie()}; -} - -#treasuryDossierNumberLabel { - text : "lima.treasury.dossierNumber"; -} - -#treasuryDossierNumberTextField { - text : {handler.getTreasury().getDossierNumber()}; -} - -#treasuryZipCodeLabel { - text : "lima.treasury.zipCode"; -} - -#treasuryZipCodeTextField { - text : {handler.getTreasury().getZipCode()}; -} - -#treasurySystemTypeLabel { - text : "lima.treasury.systemType"; -} - -#treasurySystemTypeTextField { - text : {handler.getTreasury().getSystemType()}; -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index 50235f8..d99f7f9 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -85,124 +85,35 @@ </row> <row> <cell fill="horizontal"> - <JLabel id="classificationCodeLabel"/> + <JLabel id="vatNumberLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="classificationCodeTextField"/> + <JTextField id="vatNumberTextField"/> </cell> </row> <row> <cell fill="horizontal"> - <JLabel id="phoneNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="phoneNumberTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="emailLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="emailTextField" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="vatNumber"/> - </cell> - <cell fill="horizontal"> - <JTextField id="vatNumberTextField" /> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryAddressLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryAddressTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryAddress2Label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryAddress2TextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryZipCodeLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryZipCodeTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryCityLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryCityTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasurySieLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasurySieTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryVatNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryDossierNumberTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryKeyLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryKeyTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryCdiLabel"/> + <JLabel id="classificationCodeLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasuryCdiTextField"/> + <JTextField id="classificationCodeTextField"/> </cell> </row> - - <row> <cell fill="horizontal"> - <JLabel id="treasuryServiceCodeLabel"/> + <JLabel id="phoneNumberLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasuryServiceCodeTextField"/> + <JTextField id="phoneNumberTextField"/> </cell> </row> - <row> <cell fill="horizontal"> - <JLabel id="treasurySystemTypeLabel"/> + <JLabel id="emailLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasurySystemTypeTextField"/> + <JTextField id="emailTextField" /> </cell> </row> - </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 830d8f9..97a5f0d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -24,10 +24,8 @@ package org.chorem.lima.ui.opening; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; -import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; -import org.chorem.lima.entity.Treasury; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -36,15 +34,14 @@ public class CreateIdentityPanelHandler { protected IdentityService identityService; - protected TreasuryService treasuryService; - protected CreateIdentityPanel view; public CreateIdentityPanelHandler(CreateIdentityPanel view) { this.view = view; - identityService = LimaServiceFactory.getService(IdentityService.class); - treasuryService = LimaServiceFactory.getService(TreasuryService.class); + identityService = + LimaServiceFactory.getService( + IdentityService.class); } public Identity getIdentity() { @@ -55,11 +52,6 @@ public class CreateIdentityPanelHandler { return identity; } - public Treasury getTreasury() { - Treasury treasury = treasuryService.getTreasury(); - return treasury; - } - public void updateIdentity(){ Identity identity = getIdentity(); @@ -70,7 +62,7 @@ public class CreateIdentityPanelHandler { identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - //identity.setVatNumber(view.getVatNumberTextField().getText()); + identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 9c2a4711664117acab90fef3eff32bca36d1d76b Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:42:15 2015 +0200 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. --- .../chorem/lima/business/api/AccountService.java | 6 + .../chorem/lima/business/api/EntryBookService.java | 6 + .../chorem/lima/business/api/ImportService.java | 11 ++ .../lima/business/ejb/AccountServiceImpl.java | 7 + .../lima/business/ejb/EntryBookServiceImpl.java | 7 + .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../chorem/lima/ui/importexport/ImportExport.java | 8 + .../opening/{OpeningView.css => BackupPanel.css} | 29 ---- .../org/chorem/lima/ui/opening/BackupPanel.jaxx | 39 +++++ .../{OpeningView.css => BackupPanelHandler.java} | 42 ++--- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 10 +- .../lima/ui/opening/CreateIdentityPanel.jaxx | 64 ++++---- .../ui/opening/CreateIdentityPanelHandler.java | 1 - .../org/chorem/lima/ui/opening/OpeningView.css | 11 +- .../org/chorem/lima/ui/opening/OpeningView.jaxx | 28 +++- .../chorem/lima/ui/opening/OpeningViewHandler.java | 175 +++++++++++++++++---- .../resources/i18n/lima-swing_en_GB.properties | 1 + .../resources/i18n/lima-swing_fr_FR.properties | 1 + 18 files changed, 317 insertions(+), 146 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java index b21482d..5aba6f6 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java @@ -108,4 +108,10 @@ public interface AccountService { List<Account> stringToListAccounts(String selectedAccounts); Account findAccountById(String accountId); + + /** + * Remove all accounts from Lima. + * It's suppose they have no related Entities + */ + void removeAllAccounts(); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java index 4552ade..7e0ccda 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java @@ -103,4 +103,10 @@ public interface EntryBookService { * @return All looked for entry books */ List<EntryBook> findAllEntryBookByEntryBookCodes(List<String> entryBookCodes); + + /** + * Remove all Lima Entry Books + * /!\ becarefull they must not be related to other entities + */ + void removeAllEntryBooks(); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java index d3af17f..08cd68b 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java @@ -55,6 +55,17 @@ public interface ImportService { ImportExportResults importEntriesFromEbp(String datas); + /** + * Remove BCR, Financial Transaction and VAT + */ + void removeAccountabilityLayouts(); + + /** + * Remove all entry books + * /!\ be careful, entry books must not be related to other entities + */ + void removeInitallyImportedEntryBook(); + // String importAsPDF(String data, // ImportExportEntityEnum importExportEntityEnum, // boolean saveMode); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java index b19619f..44022e7 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java @@ -305,4 +305,11 @@ public class AccountServiceImpl extends AbstractLimaService implements AccountSe } return account; } + + @Override + public void removeAllAccounts() { + AccountTopiaDao dao = getDaoHelper().getAccountDao(); + List<Account> accounts = dao.findAll(); + dao.deleteAll(accounts); + } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java index fbdff26..f2df897 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java @@ -202,4 +202,11 @@ public class EntryBookServiceImpl extends AbstractLimaService implements EntryBo } return result; } + + @Override + public void removeAllEntryBooks() { + EntryBookTopiaDao dao = getDaoHelper().getEntryBookDao(); + List<EntryBook> entryBooks = dao.findAll(); + dao.deleteAll(entryBooks); + } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java index a505e8b..9d77b9d 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java @@ -153,15 +153,30 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ }; @Override + public void removeAccountabilityLayouts() { + // vat + vatStatementService.removeAllVatStatement(); + // financialstatement + financialStatementService.removeAllFinancialStatement(); + // accounts + accountService.removeAllAccounts(); + } + + @Override + public void removeInitallyImportedEntryBook() { + entryBookService.removeAllEntryBooks(); + } + + @Override public ImportExportResults importAccountAsCSV(String contents) { ImportExportResults results = new ImportExportResults(); ImportResult result = results.createAddAndGetImportResult(Account.class); - InputStream contentStream = IOUtils.toInputStream(contents); if (StringUtils.isBlank(contents)) { result.addException(new NoDataToImportException()); } else { + InputStream contentStream = IOUtils.toInputStream(contents); try { ImportModel<Account> model = new AccountModel(); Import<Account> accounts = Import.newImport(model, contentStream); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java index 526bfa7..d0d0c47 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java @@ -168,6 +168,14 @@ public class ImportExport { } + public void resetInitialAccountabilityLayoutsImport() { + importService.removeAccountabilityLayouts(); + } + + public void resetInitialImportedEntryBook() { + importService.removeInitallyImportedEntryBook(); + } + public void processImportExport(final ImportExportEnum importExportChoice, boolean verbose) { switch (importExportChoice) { case CSV_ALL_EXPORT: diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css similarity index 70% copy from lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css copy to lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css index 5c8b8d4..73493ec 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css @@ -19,39 +19,10 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -#openingDialog { - modal : true; - title : "lima.opening"; -} - -#identityIcon { - icon : "identity.png"; -} - -#accountsIcon { - icon : "accounts.png"; -} - -#entrybooksIcon { - icon : "entryBooks.png"; -} - -#fiscalperiodsIcon { - icon : "fiscalYears.png"; -} - #welcomeLabel { text : "lima.opening.welcome"; } #importButton { text : "lima.opening.import"; -} - -#cancel { - text : "lima.opening.close"; -} - -#ok { - text : "lima.opening.next"; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx new file mode 100644 index 0000000..4b978b1 --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx @@ -0,0 +1,39 @@ +<!-- + #%L + Lima :: Swing + %% + Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + %% + 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% + --> +<JPanel> + + <BackupPanelHandler id="handler" javaBean="new BackupPanelHandler(this)"/> + + <Table> + <row> + <cell> + <JLabel id="welcomeLabel"/> + </cell> + </row> + <row> + <cell> + <JButton id="importButton" + onActionPerformed="handler.importBackup()"/> + </cell> + </row> + </Table> +</JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java similarity index 61% copy from lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css copy to lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java index 5c8b8d4..6bfc2a7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java @@ -1,3 +1,5 @@ +package org.chorem.lima.ui.opening; + /* * #%L * Lima :: Swing @@ -19,39 +21,21 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -#openingDialog { - modal : true; - title : "lima.opening"; -} -#identityIcon { - icon : "identity.png"; -} - -#accountsIcon { - icon : "accounts.png"; -} +import org.chorem.lima.enums.ImportExportEnum; +import org.chorem.lima.ui.importexport.ImportExport; -#entrybooksIcon { - icon : "entryBooks.png"; -} +public class BackupPanelHandler { -#fiscalperiodsIcon { - icon : "fiscalYears.png"; -} + protected BackupPanel view; -#welcomeLabel { - text : "lima.opening.welcome"; -} -#importButton { - text : "lima.opening.import"; -} + public BackupPanelHandler(BackupPanel view) { + this.view = view; + } -#cancel { - text : "lima.opening.close"; + public void importBackup() { + ImportExport importExport = new ImportExport(view); + importExport.importExport(ImportExportEnum.CSV_ALL_IMPORT, null, null, true); + } } - -#ok { - text : "lima.opening.next"; -} \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index 7d8da6b..91b9aca 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -33,6 +33,7 @@ #descriptionTextField { text : {handler.getIdentity().getDescription()}; + rows : 5; } #addressLabel { @@ -41,14 +42,7 @@ #addressTextField { text : {handler.getIdentity().getAddress()}; -} - -#address2Label { - text : "lima.identity.address2"; -} - -#address2TextField { - text : {handler.getIdentity().getAddress2()}; + rows : 5; } #zipCodeLabel { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index d99f7f9..f34d862 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -19,7 +19,7 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JPanel> +<JPanel constraints="BorderLayout.CENTER"> <import> org.chorem.lima.ui.opening.CreateIdentityPanelHandler </import> @@ -28,92 +28,84 @@ <Table> <row> - <cell fill="horizontal"> + <cell> <JLabel id="nameLabel" /> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="nameTextField" /> </cell> </row> <row> - <cell fill="horizontal"> - <JLabel id="descriptionLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> + <cell> <JLabel id="addressLabel"/> </cell> - <cell fill="horizontal"> - <JTextField id="addressTextField" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="address2Label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="address2TextField"/> + <cell> + <JTextArea id="addressTextField" /> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="zipCodeLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="zipCodeTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel text="lima.identity.city"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="cityTextField" /> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="businessNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="businessNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="vatNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="vatNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="classificationCodeLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="classificationCodeTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="phoneNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="phoneNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="emailLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="emailTextField" /> </cell> </row> + <row> + <cell> + <JLabel id="descriptionLabel"/> + </cell> + <cell> + <JTextArea id="descriptionTextField"/> + </cell> + </row> </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 97a5f0d..f043022 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -58,7 +58,6 @@ public class CreateIdentityPanelHandler { identity.setName(view.getNameTextField().getText()); identity.setDescription(view.getDescriptionTextField().getText()); identity.setAddress(view.getAddressTextField().getText()); - identity.setAddress2(view.getAddress2TextField().getText()); identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css index 5c8b8d4..8c7ec30 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css @@ -24,6 +24,11 @@ title : "lima.opening"; } +#backupIcon { + icon : "backup.png"; + border: {BorderFactory.createLineBorder(new Color(0x66, 0xcc, 0x00), 2)} +} + #identityIcon { icon : "identity.png"; } @@ -52,6 +57,10 @@ text : "lima.opening.close"; } -#ok { +#next { text : "lima.opening.next"; +} + +#previous { + text : "lima.opening.previous"; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx index 10968ae..d997866 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx @@ -23,7 +23,9 @@ layout="{new BorderLayout()}"> <import> + java.awt.Color javax.swing.BorderFactory + java.awt.FlowLayout javax.swing.ImageIcon jaxx.runtime.SwingUtil </import> @@ -32,13 +34,17 @@ <script> <![CDATA[ - getRootPane().setDefaultButton(ok); + getRootPane().setDefaultButton(next); protected void performNext() { dispose(); } protected void performCancel() { dispose(); } + + void $afterCompleteSetup() { + handler.init(); + } ]]> </script> @@ -48,13 +54,15 @@ <Table> <row> <cell weightx="0.1"> + <JLabel id="backupIcon"/> + </cell> + </row> + <row> + <cell> <JLabel id="identityIcon"/> </cell> <cell weightx="0.9" rows="4" fill="both"> <JPanel id='panel'> - <JLabel id="welcomeLabel"/> - <JButton id="importButton" - onActionPerformed="handler.importBackup()"/> </JPanel> </cell> </row> @@ -77,16 +85,20 @@ </cell> </row> <row weighty="0.1"> - <cell weightx="0.8"> + <cell weightx="0.7"> <JLabel text=''/> </cell> <cell weightx="0.1" fill="none"> <JButton id="cancel" onActionPerformed="performCancel()"/> </cell> - <cell weightx="0.1" fill="none"> - <JButton id="ok" - onActionPerformed="handler.next()"/> + <cell> + <JPanel layout="{new FlowLayout()}"> + <JButton id="previous" + onActionPerformed="handler.previous()"/> + <JButton id="next" + onActionPerformed="handler.next()"/> + </JPanel> </cell> </row> </Table> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java index f2b5b64..0b4a5be 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java @@ -53,29 +53,80 @@ public class OpeningViewHandler { protected OpeningView view; + + protected BackupPanel backupPanel; //Panels - private CreateAccountsPanel caPanel; + protected CreateAccountsPanel caPanel; - private CreateIdentityPanel idPanel; + protected CreateIdentityPanel idPanel; - private CreateEntryBookPanel ebPanel; + protected CreateEntryBookPanel ebPanel; - private CreateFiscalPeriodPanel fsPanel; + protected CreateFiscalPeriodPanel fsPanel; public OpeningViewHandler(OpeningView view) { this.view = view; - caPanel = new CreateAccountsPanel(); + backupPanel = new BackupPanel(); idPanel = new CreateIdentityPanel(); + caPanel = new CreateAccountsPanel(); ebPanel = new CreateEntryBookPanel(); fsPanel = new CreateFiscalPeriodPanel(); - step = 0; } + public void init() { + step = 0; + next(); + } - public void importBackup() { + public void previous() { ImportExport importExport = new ImportExport(view); - importExport.importExport(ImportExportEnum.CSV_ALL_IMPORT, null, null, true); - view.dispose(); + JPanel panel = view.getPanel(); + panel.removeAll(); + step = step - 2; + switch (step) { + case 0: + view.getPrevious().setEnabled(false); + view.getIdentityIcon().setBorder(noBorder); + view.getBackupIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(backupPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 1: + //refresh UI + view.getAccountsIcon().setBorder(noBorder); + view.getIdentityIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(idPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 2: + //refresh UI + // remove all accounts + view.getEntrybooksIcon().setBorder(noBorder); + view.getAccountsIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + caPanel.getButtonGroup().setSelectedValue(null); + panel.add(caPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 3: + view.getNext().setText(t("lima.opening.next")); + // remove all entry books + view.getFiscalperiodsIcon().setBorder(noBorder); + view.getEntrybooksIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(ebPanel); + panel.validate(); + view.repaint(); + step++; + break; + default: + break; + } + } public void next() { @@ -84,14 +135,25 @@ public class OpeningViewHandler { panel.removeAll(); switch (step) { case 0: + view.getPrevious().setEnabled(false); //refresh UI + view.getBackupIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(backupPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 1: + view.getPrevious().setEnabled(true); + //refresh UI + view.getBackupIcon().setBorder(noBorder); view.getIdentityIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(idPanel); panel.validate(); view.repaint(); step++; break; - case 1: + case 2: idPanel.getHandler().updateIdentity(); //refresh UI view.getIdentityIcon().setBorder(noBorder); @@ -101,26 +163,10 @@ public class OpeningViewHandler { view.repaint(); step++; break; - case 2: - Object value = caPanel.getButtonGroup().getSelectedValue(); - // if action confirmed - if (value != null) { - if (value instanceof AccountsChartEnum) { - AccountsChartEnum defaultAccountsChartEnum = (AccountsChartEnum) value; - //Import accounts chart - switch (defaultAccountsChartEnum) { - case IMPORT_EBP: - importExport.importExport(ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT, - null, defaultAccountsChartEnum.getDefaultFileURL(), false); - break; - - default: - importExport.importExport(ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT, - null, defaultAccountsChartEnum.getDefaultFileURL(), false); - break; - } - } - } + + case 3: + importAccountabilityLayouts(importExport); + view.getAccountsIcon().setBorder(noBorder); view.getEntrybooksIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(ebPanel); @@ -128,20 +174,23 @@ public class OpeningViewHandler { view.repaint(); step++; break; - case 3: + + case 4: if (ebPanel.getImportEntryBook().isSelected()) { importExport.importExport(ImportExportEnum.CSV_ENTRYBOOKS_IMPORT, null, EntryBooksChartEnum.DEFAULT.getDefaultFileURL(), false); + } else { + importExport.resetInitialImportedEntryBook(); } view.getEntrybooksIcon().setBorder(noBorder); view.getFiscalperiodsIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(fsPanel); panel.validate(); - view.getOk().setText(t("lima.opening.end")); + view.getNext().setText(t("lima.opening.end")); view.repaint(); step++; break; - case 4: + case 5: try { FiscalPeriod fiscalPeriod = new FiscalPeriodImpl(); fiscalPeriod.setBeginDate(fsPanel.getBeginDatePicker().getDate()); @@ -157,6 +206,66 @@ public class OpeningViewHandler { } } view.dispose(); + break; + } + } + + protected void importAccountabilityLayouts(ImportExport importExport) { + Object value = caPanel.getButtonGroup().getSelectedValue(); + // if action confirmed + if (value != null) { + // reset previous imported values + importExport.resetInitialAccountabilityLayoutsImport(); + + AccountsChartEnum defaultAccountsChartEnum = (AccountsChartEnum) value; + //Import accounts chart + switch (defaultAccountsChartEnum) { + case IMPORT_EBP: + importExport.importExport(ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + + default: + importExport.importExport(ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + } + //Import financialstatement + switch (defaultAccountsChartEnum) { + case SHORTENED: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + case DEVELOPED: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, FinancialStatementsChartEnum.DEVELOPED.getDefaultFileUrl() , false); + break; + default: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, FinancialStatementsChartEnum.BASE.getDefaultFileUrl(), false); + break; + } + //Import vatstatement + switch (defaultAccountsChartEnum) { + case SHORTENED: + + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.SHORTENED.getDefaultFileUrl(), false); + break; + case BASE: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.BASE.getDefaultFileUrl(), false); + break; + case DEVELOPED: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.DEVELOPED.getDefaultFileUrl(), false); + break; + default: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.DEFAULT.getDefaultFileUrl(), false); + break; + } + } } } 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 4f79843..5eeb591 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 @@ -483,6 +483,7 @@ lima.opening.entryBook=Select it to import default entry books lima.opening.fiscalPeriod=Create fiscal period lima.opening.import=Import a CSV backup lima.opening.next=Next +lima.opening.previous=Previous lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantly your already existing save in CSV format<br/><br/><br/><br/></center></html> lima.paste=Paste lima.preferences=Preferences 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 ef47c97..9747eee 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 @@ -490,6 +490,7 @@ lima.opening.entryBook=<html>Cochez la case pour importer les journaux par défa lima.opening.fiscalPeriod=Création de l'exercice lima.opening.import=Importer une sauvegarde CSV lima.opening.next=Suivant +lima.opening.previous=Retour lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour démarrer votre comptabilité en quelques instants <br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html> lima.paste=Coller lima.preferences=Préférences -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 6c63783fdab3a94f352d996d8cbf3965385372a3 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:48:02 2015 +0200 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima --- lima-swing/src/main/resources/icons/backup.png | Bin 0 -> 4803 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/lima-swing/src/main/resources/icons/backup.png b/lima-swing/src/main/resources/icons/backup.png new file mode 100644 index 0000000..a9448cd Binary files /dev/null and b/lima-swing/src/main/resources/icons/backup.png differ -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 7cc39ee6473b0d5c64fca2ecbeb0ccf706b828a0 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 30 17:10:33 2015 +0200 refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports --- .../lima/business/ejb/AbstractLimaService.java | 5 - .../ejb/report/AccountReportServiceImpl.java | 46 ++-- .../ejb/report/BalanceReportServiceImpl.java | 28 +-- .../business/ejb/report/CommonsDocumentReport.java | 57 +++++ .../report/GeneralEntryBookReportServiceImpl.java | 18 +- .../ejb/report/LedgerReportServiceImpl.java | 19 +- .../ProvisionalEntryBookReportServiceImpl.java | 25 ++- .../resources/i18n/lima-business_en_GB.properties | 80 ++++--- .../resources/i18n/lima-business_fr_FR.properties | 78 ++++--- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 60092 -> 61424 bytes .../jasperreports/account/DocumentReport.jrxml | 250 +++++++++++++-------- .../jasperreports/balance/DocumentReport.jrxml | 86 +++++-- .../jasperreports/entryBook/DocumentReport.jrxml | 86 +++++-- .../jasperreports/entryBook/EntryBookReport.jrxml | 3 +- .../entryBook/FinancialPeriodReport.jrxml | 4 +- .../entryBook/TransactionReport.jrxml | 29 +-- .../generalEntryBook/DocumentReport.jrxml | 86 +++++-- .../generalEntryBook/EntryBookPeriodReport.jrxml | 6 +- .../generalLedger/DocumentReport.jrxml | 86 +++++-- .../generalLedger/GeneralLedgerReport.jrxml | 18 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 8 + .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 4 +- .../chorem/lima/ui/identity/IdentityHandler.java | 12 + .../resources/i18n/lima-swing_en_GB.properties | 32 +-- 24 files changed, 727 insertions(+), 339 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java index 2cb10ea..bedb0a5 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java @@ -27,8 +27,6 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaInterceptor; import org.chorem.lima.entity.LimaCallaoTopiaDaoSupplier; -import java.text.SimpleDateFormat; - /** * Abstract code for all ejb services (get context, catch, finally...). * @@ -37,9 +35,6 @@ import java.text.SimpleDateFormat; */ public abstract class AbstractLimaService { - public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); - public static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm"); - /** Logger. */ protected static final Log log = LogFactory.getLog(AbstractLimaService.class); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 6616e08..1879a4b 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -5,7 +5,6 @@ import org.apache.commons.collections4.CollectionUtils; import org.chorem.lima.beans.AccountEntry; import org.chorem.lima.beans.AccountEntryImpl; import org.chorem.lima.beans.DocumentReport; -import org.chorem.lima.beans.DocumentReportImpl; import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaBusinessConfig; import org.chorem.lima.business.api.IdentityService; @@ -15,7 +14,6 @@ import org.chorem.lima.business.ejb.AbstractLimaService; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.Entry; -import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; @@ -45,17 +43,10 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc @Override public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { - String reportName = t("lima.config.documentReport.accountReport.title"); - DocumentReport documentReport = getDocumentReport(reportName, from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); - - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnLetterTitle(t("lima.config.documentReport.columnLetterTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + String reportName = t("lima-business.document.accountReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); + + setHeaderColumnTitles(documentReport); AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); @@ -98,7 +89,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += ", aucune entrée trouvé sur ce compte"; + selectedAccounts += ", aucune entrée trouvée sur ce compte"; } else if (accountEntries.size() == 1){ selectedAccounts += ", et son compte fils"; } else { @@ -116,23 +107,14 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc return documentReport; } - protected static DocumentReport getDocumentReport(String reportName, Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { - Date currentDate = new Date(); - DocumentReport documentReport = new DocumentReportImpl(); - documentReport.setSubReport(subReport); - documentReport.setFormatter(bigDecimalFormat); - - documentReport.setTitleReport(reportName); - - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setTitleCompanyName(companyName); - documentReport.setTitleCurrentDate(t("lima.config.documentReport.titleCurrentDate", DATE_FORMAT.format(currentDate), TIME_FORMAT.format(currentDate))); - documentReport.setTitleFromToDate(t("lima.config.documentReport.titleFromToDate", DATE_FORMAT.format(from), DATE_FORMAT.format(to))); - - documentReport.setHeaderSelectedAccountsLabel(t("lima.config.documentReport.headerSelectedAccountsLabel")); - documentReport.setHeaderCurrencyLabel(t("lima.config.documentReport.headerCurrencyLabel")); - documentReport.setHeaderCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - return documentReport; + protected void setHeaderColumnTitles(DocumentReport documentReport) { + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.columnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnLetterTitle(t("lima-business.document.columnLetterTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); } } 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 7992e2f..ff5af26 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 @@ -91,17 +91,17 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima.config.documentReport.balanceReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); - - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnBalanceForPeriodTitle(t("lima.config.documentReport.columnBalanceForPeriodTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + String reportName = t("lima-business.document.balanceReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -157,7 +157,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal Account toAccount = accounts.get(accounts.size()-1); String fromAccountText = StringUtils.isNotBlank(fromAccount.getLabel()) ? fromAccount.getLabel() + " (" + fromAccount.getAccountNumber() + ")" : fromAccount.getAccountNumber(); String toAccountText = StringUtils.isNotBlank(toAccount.getLabel()) ? toAccount.getLabel() + " (" + toAccount.getAccountNumber() + ")" : toAccount.getAccountNumber(); - documentReport.setHeaderSelectedAccounts(t("lima.config.documentReport.headerSelectedAccounts", fromAccountText, toAccountText)); + documentReport.setHeaderSelectedAccounts(t("lima-business.document.headerSelectedAccounts", fromAccountText, toAccountText)); } /** @@ -211,8 +211,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); balanceAccount.setAccountNumber(accountNumber); balanceAccount.setLabel(account.getLabel()); - balanceAccount.setSubTotalForLabel(t("lima.config.documentReport.subTotalFor")); - balanceAccount.setTotalForLabel(t("lima.config.documentReport.totalFor")); + balanceAccount.setSubTotalForLabel(t("lima-business.document.subTotalFor")); + balanceAccount.setTotalForLabel(t("lima-business.document.totalFor")); if (balance.compareTo(BigDecimal.ZERO) == 1) { balanceAccount.setDebitBalance(balance.abs()); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java new file mode 100644 index 0000000..3b17a97 --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java @@ -0,0 +1,57 @@ +package org.chorem.lima.business.ejb.report; + +import net.sf.jasperreports.engine.JasperReport; +import org.apache.commons.lang3.StringUtils; +import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.DocumentReportImpl; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.entity.Identity; + +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.nuiton.i18n.I18n.t; + +/** + * Created by davidcosse on 29/07/15. + */ +public class CommonsDocumentReport { + + public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); + public static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm"); + + protected static DocumentReport getDocumentReport(String reportName, Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { + Date currentDate = new Date(); + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setSubReport(subReport); + documentReport.setFormatter(bigDecimalFormat); + + documentReport.setTitleReport(reportName); + + Identity identity = identityService.getIdentity(); + String companyName = identity == null ? "" : identity.getName(); + String companyAddress = identity == null ? "" : StringUtils.replace(identity.getAddress(), "\n", ", "); + String companyPostCode = identity == null ? "" : identity.getZipCode(); + String companyCity = identity == null ? "" : identity.getCity(); + String businessNumber = identity == null ? "" : identity.getBusinessNumber(); + String phone = identity == null ? "" : identity.getPhoneNumber(); + + documentReport.setTitleCompanyName(companyName); + documentReport.setTitleCompanyAddress(companyAddress); + documentReport.setTitleCompanyPostCode(companyPostCode); + documentReport.setTitleCompanyCity(companyCity); + documentReport.setTitleCompanySiret(businessNumber); + documentReport.setTitleCompanyPhone(phone); + + documentReport.setTitleCompanySiretLabel(t("lima-business.document.titleCompanySiretLabel")); + documentReport.setTitleCompanyPhoneLabel(t("lima-business.document.titleCompanyPhoneLabel")); + documentReport.setTitleCurrentDate(t("lima-business.document.titleCurrentDate", DATE_FORMAT.format(currentDate), TIME_FORMAT.format(currentDate))); + documentReport.setTitleFromToDate(t("lima-business.document.titleFromToDate", DATE_FORMAT.format(from), DATE_FORMAT.format(to))); + + documentReport.setHeaderSelectedAccountsLabel(t("lima-business.document.headerSelectedAccountsLabel")); + documentReport.setHeaderCurrencyLabel(t("lima-business.document.headerCurrencyLabel")); + documentReport.setHeaderCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); + return documentReport; + } +} 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 31ea391..bf4bd1e 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 @@ -93,15 +93,15 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @Override public DocumentReport getGeneralEntryBookDocumentReport(Date beginDate, Date endDate, DecimalFormat bigDecimalFormat, JasperReport generalEntryBooksJasperReport, JasperReport entriesJasperReport) { - String reportName = t("lima.config.documentReport.generalEntryBookReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima-business.document.generalEntryBookReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setLastPageColumnDescription(t("lima.config.documentReport.entrybook.lastPageColumnDescription")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.columnEntryBookTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setLastPageColumnDescription(t("lima-business.document.entrybook.lastPageColumnDescription")); try { if (beginDate != null && endDate != null) { @@ -176,6 +176,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { GeneralEntryBook generalEntryBook = new GeneralEntryBookImpl(); + generalEntryBook.setSubTotalForMonthText(t("lima-business.document.subTotalForMonthText")); + generalEntryBook.setForMonthText(t("lima-business.document.forMonthText")); generalEntryBook.setFormatter(bigDecimalFormat); generalEntryBook.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); generalEntryBook.setPeriod(financialPeriod.getBeginDate()); 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 3e4c4d7..ffec468 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 @@ -71,16 +71,16 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg // grand livre @Override public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, DecimalFormat decimalFormat, JasperReport generalLedgersJasperReport, JasperReport entriesJasperReport) { - String reportName = t("lima.config.documentReport.ledgerReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); + String reportName = t("lima-business.document.ledgerReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); - documentReport.setColumnDateTitle(t("lima.config.documentReport.setColumnDateTitle")); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.setColumnEntryBookTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnBalanceTitle(t("lima.config.documentReport.columnBalanceTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.setColumnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.setColumnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnBalanceTitle(t("lima-business.document.columnBalanceTitle")); if (beginDate != null && endDate != null) { try { @@ -99,6 +99,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg if (account != null) { GeneralLedger generalLedger = new GeneralLedgerImpl(); generalLedger.setFormatter(decimalFormat); + generalLedger.setTotalForAccountText(t("lima-business.document.totalForAccount")); generalLedger.setAccountNumber(account.getAccountNumber()); generalLedger.setLabel(account.getLabel()); BigDecimal amountCredit = reportsDatas.getAmountCredit(); 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 cf5a0a5..206f478 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,18 +81,18 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo @Override public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, DecimalFormat bigDecimalFormat, JasperReport entryBooksJasperReport, JasperReport financialPeriodsJasperReport, JasperReport transactionsJasperReport) { - String reportName = t("lima.config.documentReport.provisionalEntryBookReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima-business.document.provisionalEntryBookReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); - documentReport.setLastPageColumnDescription(t("lima.config.documentReport.generalEntrybook.lastPageColumnDescription")); + documentReport.setLastPageColumnDescription(t("lima-business.document.generalEntrybook.lastPageColumnDescription")); try { @@ -120,6 +120,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo entryBookReport.setCode(entryBook.getCode()); entryBookReport.setSubReport(financialPeriodsJasperReport); entryBookReport.setFormatter(bigDecimalFormat); + entryBookReport.setEntryBookCodeAndNameText(t("lima-business.document.entryBookCodeAndName")); BigDecimal entryBookSoldeDebit = BigDecimal.ZERO; BigDecimal entryBookSoldeCredit = BigDecimal.ZERO; @@ -128,6 +129,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for (FinancialPeriod financialPeriod : financialPeriods) { org.chorem.lima.beans.FinancialPeriod financialPeriodReport = new FinancialPeriodImpl(); + financialPeriodReport.setForMonthText(t("lima-business.document.forMonthText")); + financialPeriodReport.setBalanceForEntryBookText(t("lima-business.document.balanceForEntryBook")); financialPeriodReport.setSubReport(transactionsJasperReport); financialPeriodReport.setPeriod(financialPeriod.getBeginDate()); @@ -149,6 +152,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo Account account = entry.getAccount(); String accountLabel = account != null ? entry.getAccount().getAccountNumber() + " - " + entry.getAccount().getLabel() : ""; Transaction transaction = new TransactionImpl(); + transaction.setSubTotalText(t("lima-business.document.subTotal")); + transaction.setSubTotalForText(t("lima-business.document.subTotalFor")); transaction.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); transaction.setAccount(accountLabel); transaction.setDescription(entry.getDescription()); 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 921217d..f809c87 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,17 +1,36 @@ application.version=Version blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-business.document.account=Account +lima-business.document.account.noAccount=Any account present +lima-business.document.account.noAccountTitle=Any account present +lima-business.document.accountReport.title=ACCOUNT lima-business.document.accounts=Accounts lima-business.document.address=Address lima-business.document.addressMore=Address (more) lima-business.document.amount=Amount lima-business.document.amounts=Amounts lima-business.document.amountsperiod=Amounts %1$tB %1$tY +lima-business.document.assets=Assets lima-business.document.balance=Balance +lima-business.document.balanceForEntryBook=Total for entry book %s until %s +lima-business.document.balanceReport.title=BALANCE +lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=Business N° lima-business.document.city=City lima-business.document.classificationcode=Classification Code +lima-business.document.columnAccountTitle=Account +lima-business.document.columnBalanceForPeriodTitle=Balance +lima-business.document.columnBalanceTitle=Balance +lima-business.document.columnCreditTitle=Credit +lima-business.document.columnDateTitle=Date +lima-business.document.columnDebitTitle=Debit +lima-business.document.columnDescriptionTitle=Label +lima-business.document.columnEntryBookTitle=Entry book +lima-business.document.columnLetterTitle=Letter +lima-business.document.columnTotalForPeriodTitle=Total for period +lima-business.document.columnVoucherTitle=Voucher lima-business.document.credit=Credit +lima-business.document.currentAsset=Current asset lima-business.document.date=Date lima-business.document.date.begin=Begin date lima-business.document.date.end=End date @@ -19,13 +38,24 @@ lima-business.document.dateformat=%1$tm/%1$te/%1$tY lima-business.document.debit=Debit lima-business.document.description=Description lima-business.document.entries=Entries +lima-business.document.entryBookCodeAndName=Entry book %s %s lima-business.document.entrybook=Entry book +lima-business.document.entrybook.lastPageColumnDescription=Total for selected entry books lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement +lima-business.document.forMonthText=%s +lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK +lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook lima-business.document.grossamount=Gross Amount +lima-business.document.headerCurrencyLabel=Currency\: +lima-business.document.headerSelectedAccounts=%s to %s +lima-business.document.headerSelectedAccountsLabel=Accounts\: +lima-business.document.investments=Investments lima-business.document.label=Label lima-business.document.ledger=Ledger +lima-business.document.ledgerReport.title=LEDGER +lima-business.document.liabilities=Liabilities lima-business.document.monthformat=%1$tB %1$tY lima-business.document.movementcredit=Credit movement lima-business.document.movementdebit=Debit movement @@ -34,11 +64,23 @@ lima-business.document.period1=Periode from lima-business.document.period1format=%1$tm/%1$te/%1$tY lima-business.document.period2=to lima-business.document.period2format=%1$tm/%1$te/%1$tY +lima-business.document.provisionalEntryBookReport.title=PROVISIONAL ENTRY BOOK lima-business.document.provisiondeprecationamount=Provision Deprecation Amount +lima-business.document.setColumnDateTitle=Date +lima-business.document.setColumnEntryBookTitle=Entry book lima-business.document.society=Society lima-business.document.solde=Solde lima-business.document.soldecredit=Credit solde lima-business.document.soldedebit=Debit solde +lima-business.document.subTotal=Sub total +lima-business.document.subTotalFor=Sub total for %s +lima-business.document.subTotalForMonthText= +lima-business.document.titleCompanyPhoneLabel=Phone\: +lima-business.document.titleCompanySiretLabel=Business N°\: +lima-business.document.titleCurrentDate=Printed on %s at %s +lima-business.document.titleFromToDate=From %s to %s +lima-business.document.totalFor=total for\: +lima-business.document.totalForAccount=Total for account %s lima-business.document.vat=VAT form lima-business.document.vatnumber=VAT N° lima-business.document.voucher=Voucher @@ -58,54 +100,19 @@ lima.config.dateFormat.description= lima.config.dateFormat.label= lima.config.decimalSeparator.label= lima.config.documentReport.account.documentReportModelPath.description= -lima.config.documentReport.account.noAccount=Any account present -lima.config.documentReport.account.noAccountTitle=Any account present -lima.config.documentReport.accountReport.title=ACCOUNT -lima.config.documentReport.assets=Assets -lima.config.documentReport.balance=Balance lima.config.documentReport.balance.balanceAccountReportModelPath.description= lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= lima.config.documentReport.balance.documentReportModelPath.description= -lima.config.documentReport.balanceReport.title=BALANCE -lima.config.documentReport.balanceSheet=Balance -lima.config.documentReport.columnAccountTitle=Account -lima.config.documentReport.columnBalanceForPeriodTitle=Balance -lima.config.documentReport.columnBalanceTitle=Balance -lima.config.documentReport.columnCreditTitle=Credit -lima.config.documentReport.columnDateTitle=Date -lima.config.documentReport.columnDebitTitle=Debit -lima.config.documentReport.columnDescriptionTitle=Label -lima.config.documentReport.columnEntryBookTitle=Entry book -lima.config.documentReport.columnLetterTitle=Letter -lima.config.documentReport.columnTotalForPeriodTitle=Total for period -lima.config.documentReport.columnVoucherTitle=Voucher -lima.config.documentReport.currentAsset=Current asset lima.config.documentReport.entrybook.documentReportModelPath.description= lima.config.documentReport.entrybook.entryBookModelPath.description= lima.config.documentReport.entrybook.financialPeriodModelPath.description= -lima.config.documentReport.entrybook.lastPageColumnDescription= lima.config.documentReport.entrybook.transactionReportModelPath.description= -lima.config.documentReport.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= -lima.config.documentReport.generalEntrybook.lastPageColumnDescription= lima.config.documentReport.generalLedger.documentReportModelPath.description= lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= lima.config.documentReport.generalLedger.generalLedgerModelPath.description= -lima.config.documentReport.headerCurrencyLabel=Currency\: -lima.config.documentReport.headerSelectedAccounts=%s to %s -lima.config.documentReport.headerSelectedAccountsLabel=Accounts\: -lima.config.documentReport.investments=Investments -lima.config.documentReport.ledgerReport.title=LEDGER -lima.config.documentReport.liabilities=Liabilities -lima.config.documentReport.provisionalEntryBookReport.title=SUMMARY BY ACCOUNT -lima.config.documentReport.setColumnDateTitle=Date -lima.config.documentReport.setColumnEntryBookTitle=Entry book -lima.config.documentReport.subTotalFor=Sub total for\: -lima.config.documentReport.titleCurrentDate=Printed on %s at %s -lima.config.documentReport.titleFromToDate=From %s to %s -lima.config.documentReport.totalFor=total for\: lima.config.host.address.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= @@ -126,6 +133,9 @@ lima.host.http.port.description= lima.importexport.import.alreadyExistFinancialStatement=Same financial statement exists lima.lettering.accountRegularization=Regulatory account lima.report.fromDateToDate= +lima.reports.account.noAccount=Any account present +lima.reports.account.noAccountTitle=Any account present +lima.reports.accounts=Accounts lima.table.credit=Credit lima.table.date=Date lima.table.debit=Debit 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 da69ed6..bfabd31 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,17 +1,34 @@ application.version=Version blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-business.document.account=Compte +lima-business.document.accountReport.title=COMPTE lima-business.document.accounts=Comptes lima-business.document.address=Adresse lima-business.document.addressMore=Adresse - suite lima-business.document.amount=Total lima-business.document.amounts=Totaux lima-business.document.amountsperiod=Totaux %1$tB %1$tY +lima-business.document.assets=avoirs lima-business.document.balance=Balance +lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s +lima-business.document.balanceReport.title=BALANCE +lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=N° Siret lima-business.document.city=Ville lima-business.document.classificationcode=NAF +lima-business.document.columnAccountTitle=Compte +lima-business.document.columnBalanceForPeriodTitle=Solde période +lima-business.document.columnBalanceTitle=Solde +lima-business.document.columnCreditTitle=Crédit +lima-business.document.columnDateTitle=Date +lima-business.document.columnDebitTitle=Débit +lima-business.document.columnDescriptionTitle=Intitulé +lima-business.document.columnEntryBookTitle=Journal +lima-business.document.columnLetterTitle=Lettre +lima-business.document.columnTotalForPeriodTitle=Total période +lima-business.document.columnVoucherTitle=Pièce comptable lima-business.document.credit=Crédit +lima-business.document.currentAsset=Actif à court terme lima-business.document.date=Date lima-business.document.date.begin=Date de début\: lima-business.document.date.end=Date de fin\: @@ -19,13 +36,24 @@ lima-business.document.dateformat=%1$te/%1$tm/%1$tY lima-business.document.debit=Débit lima-business.document.description=Description lima-business.document.entries=entrées +lima-business.document.entryBookCodeAndName=Journal %s %s lima-business.document.entrybook=Journal +lima-business.document.entrybook.lastPageColumnDescription=Total pour les journaux sélectionnés lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat +lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE +lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général lima-business.document.grossamount=Brut +lima-business.document.headerCurrencyLabel=Devise\: +lima-business.document.headerSelectedAccounts=%s à %s +lima-business.document.headerSelectedAccountsLabel=Comptes\: +lima-business.document.investments=investissements lima-business.document.label=Libellé lima-business.document.ledger=Grand Livre +lima-business.document.ledgerReport.title=GRAND LIVRE +lima-business.document.liabilities=passif lima-business.document.monthformat=%1$tB %1$tY lima-business.document.movementcredit=Mouvement Créditeur lima-business.document.movementdebit=Mouvement Débiteur @@ -34,11 +62,23 @@ lima-business.document.period1=Période du lima-business.document.period1format=%1$te/%1$tm/%1$tY lima-business.document.period2=au lima-business.document.period2format=%1$te/%1$tm/%1$tY +lima-business.document.provisionalEntryBookReport.title=JOURNAL PROVISOIRE lima-business.document.provisiondeprecationamount=Amortissements et provisions +lima-business.document.setColumnDateTitle=Date +lima-business.document.setColumnEntryBookTitle=Journal lima-business.document.society=Nom lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur +lima-business.document.subTotal=Sous total +lima-business.document.subTotalFor=Sous total pour %s +lima-business.document.subTotalForMonthText=Sous-total pour le mois de %s +lima-business.document.titleCompanyPhoneLabel=Téléphone\: +lima-business.document.titleCompanySiretLabel=SIRET\: +lima-business.document.titleCurrentDate=Édition du %s à %s +lima-business.document.titleFromToDate=Du %s au %s +lima-business.document.totalFor=total pour\: +lima-business.document.totalForAccount=Total pour le compte %s lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA lima-business.document.vatPeriod1=%1$tM %1$tY @@ -58,60 +98,28 @@ lima.config.data.dir.description=Répertoire des données de Lima lima.config.dateFormat.description= lima.config.dateFormat.label= lima.config.decimalSeparator.label= +lima.config.document.dir.description=Dossier des rapports 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.accountReport.title=COMPTE -lima.config.documentReport.assets=avoirs -lima.config.documentReport.balance=Solde 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.balanceReport.title=BALANCE -lima.config.documentReport.balanceSheet=Balance lima.config.documentReport.bigDecimalFormat=formattage des montants -lima.config.documentReport.columnAccountTitle=Compte -lima.config.documentReport.columnBalanceForPeriodTitle=Solde période -lima.config.documentReport.columnBalanceTitle=Solde -lima.config.documentReport.columnCreditTitle=Crédit -lima.config.documentReport.columnDateTitle=Date -lima.config.documentReport.columnDebitTitle=Débit -lima.config.documentReport.columnDescriptionTitle=Intitulé -lima.config.documentReport.columnEntryBookTitle=Journal -lima.config.documentReport.columnLetterTitle=Lettre -lima.config.documentReport.columnTotalForPeriodTitle=Total période -lima.config.documentReport.columnVoucherTitle=Pièce comptable -lima.config.documentReport.currentAsset=Actif à court terme -lima.config.documentReport.dir.description=Dossier des rapports 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.lastPageColumnDescription=Total pour les journaux sélectionnés 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.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE 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.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' 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.documentReport.headerCurrencyLabel=Devise\: -lima.config.documentReport.headerSelectedAccounts=%s à %s -lima.config.documentReport.headerSelectedAccountsLabel=Comptes\: -lima.config.documentReport.investments=investissements -lima.config.documentReport.ledgerReport.title=GRAND LIVRE -lima.config.documentReport.liabilities=passif -lima.config.documentReport.provisionalEntryBookReport.title=RÉCAPITULATIF PAR COMPTE -lima.config.documentReport.setColumnDateTitle=Date -lima.config.documentReport.setColumnEntryBookTitle=Journal -lima.config.documentReport.subTotalFor=Sous total pour\: -lima.config.documentReport.titleCurrentDate=Édition du %s à %s -lima.config.documentReport.titleFromToDate=Du %s au %s -lima.config.documentReport.totalFor=total pour\: lima.config.host.address.description=Adresse du serveur LIMA lima.config.host.http.port.description=Port HTTP +lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport lima.config.rulesnationality.description=Règles nationales lima.config.scale.description=Précision @@ -127,8 +135,8 @@ lima.host.http.address.description= lima.host.http.port.description=Port du serveur web de Lima lima.importexport.import.alreadyExistFinancialStatement=Transaction financière exitante lima.lettering.accountRegularization=Compte de régulation -lima.report.fromDateToDate= lima.reports.account.noAccount=Aucun compte présent +lima.reports.accounts=Comptes lima.table.credit=Credit lima.table.date=Date lima.table.debit=Débit diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 4bb153c..790db87 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml index 71d897f..0d55892 100644 --- a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -1,44 +1,51 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-29T11:12:29 --> +<!-- 2015-07-29T11:17:51 --> <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" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> - <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> - <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> - <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> - </style> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> - <queryString> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <queryString> <![CDATA[]]> </queryString> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="accounts" class="java.util.List"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="accounts" class="java.util.List"/> - <field name="titleCompanyName" class="java.lang.String"/> - <field name="titleCurrentDate" class="java.lang.String"/> - <field name="titleFromToDate" class="java.lang.String"/> - <field name="titleReport" class="java.lang.String"/> + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> - <field name="headerCurrency" class="java.lang.String"/> - <field name="headerCurrencyLabel" class="java.lang.String"/> - <field name="headerSelectedAccounts" class="java.lang.String"/> - <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> - <field name="columnAccountTitle" class="java.lang.String"/> - <field name="columnCreditTitle" class="java.lang.String"/> - <field name="columnDateTitle" class="java.lang.String"/> - <field name="columnDebitTitle" class="java.lang.String"/> - <field name="columnDescriptionTitle" class="java.lang.String"/> - <field name="columnEntryBookTitle" class="java.lang.String"/> - <field name="columnLetterTitle" class="java.lang.String"/> - <field name="columnVoucherTitle" class="java.lang.String"/> + <field name="columnAccountTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDateTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnEntryBookTitle" class="java.lang.String"/> + <field name="columnLetterTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" 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> @@ -47,67 +54,120 @@ <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{titleReport}]]></textFieldExpression> - </textField> - <textField 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[$F{titleCurrentDate}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> - </frame> - </band> - </title> - <pageHeader> - <band height="16" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></textFieldExpression> - </textField> - </band> - </pageHeader> + <title> + <band height="51" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" 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="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleReport}]]></textFieldExpression> + </textField> + <textField 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[$F{titleCurrentDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="16" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></textFieldExpression> + </textField> + </band> + </pageHeader> <columnHeader> <band height="20"> <frame> @@ -129,7 +189,7 @@ <textFieldExpression><![CDATA[$F{columnDateTitle}]]></textFieldExpression> </textField> <textField> - <reportElement style="HeaderColumn" x="146" y="0" width="36" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> + <reportElement style="HeaderColumn" x="146" y="0" width="36" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> @@ -161,14 +221,14 @@ <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> </textField> <textField> <reportElement style="HeaderColumn" x="506" y="0" width="72" height="20" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index 16754a9..bc37ab4 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -22,6 +22,13 @@ <field name="mainAccounts" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -45,9 +52,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" 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"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" 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"/> @@ -55,7 +62,68 @@ <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"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -70,20 +138,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml index d6ade61..c6e48a2 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml @@ -38,6 +38,13 @@ <field name="entryBooks" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -68,9 +75,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" 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"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" 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"/> @@ -78,7 +85,68 @@ <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"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -93,20 +161,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml index 79c7327..aeca794 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml @@ -12,6 +12,7 @@ </queryString> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="entryBookCodeAndNameText" class="java.lang.String"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="financialPeriods" class="java.util.List"/> @@ -40,7 +41,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Journal " + $F{code} + " " + $F{label}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{entryBookCodeAndNameText}, $F{code},$F{label})]]></textFieldExpression> </textField> <textField> <reportElement x="434" y="0" width="72" height="10" uuid="baca77fb-1d57-428f-8746-1bb482b61b55"/> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml index 63e271a..b5134e5 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml @@ -19,6 +19,8 @@ <![CDATA[]]> </queryString> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="balanceForEntryBookText" class="java.lang.String"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="debitBalance" class="java.math.BigDecimal"/> <field name="creditBalance" class="java.math.BigDecimal"/> @@ -122,7 +124,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Solde pour le journal " + $F{entryBookCode} + " jusqu'à fin " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{balanceForEntryBookText}, $F{entryBookCode}, new SimpleDateFormat("MMMM yyyy").format($F{period}))]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml index c841467..02e7159 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml @@ -16,6 +16,9 @@ <queryString> <![CDATA[]]> </queryString> + <field name="subTotalText" class="java.lang.String"/> + <field name="subTotalForText" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="dateFormat" class="java.text.SimpleDateFormat"/> <field name="description" class="java.lang.String"/> @@ -24,19 +27,19 @@ <field name="transactionDate" class="java.util.Date"/> <field name="account" class="java.lang.String"/> <field name="voucher" class="java.lang.String"/> - <variable name="entryBookDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variable name="entryBookDebitBalance" 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"> + <variable name="entryBookEndColumnDebitBalance" 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"> + <variable name="entryBookCreditBalance" 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"> + <variable name="entryBookEndColumnCreditBalance" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> <variableExpression><![CDATA[$F{credit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> @@ -110,29 +113,29 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Sous-total"]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{subTotalText}]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="false"> <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="75ef2eb9-6e2d-447c-9dd6-488a63fcdf04"> - <printWhenExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + <printWhenExpression><![CDATA[new Boolean($V{entryBookEndColumnDebitBalance}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> - <font fontName="DejaVu Sans Mono" size="8"/> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookEndColumnDebitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookEndColumnDebitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="c52c36a6-6a50-473b-9dad-0526f039b7c1"/> <textElement textAlignment="Right"> - <font fontName="DejaVu Sans Mono" size="8"/> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookEndColumnCreditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookEndColumnCreditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> @@ -158,7 +161,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Sous-total pour " + new SimpleDateFormat("MMMM yyyy").format($F{transactionDate})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{subTotalForText}, 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"/> @@ -170,7 +173,7 @@ <font fontName="DejaVu Sans Mono" 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{entryBookDebitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookDebitBalance}) : ""]]></textFieldExpression> </textField> <textField> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="a7b19080-fcc5-407b-ae5c-20a85afd363e"/> @@ -182,7 +185,7 @@ <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookCreditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookCreditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml index 367cf23..5fe386e 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml @@ -34,6 +34,13 @@ <field name="generalEntryBooks" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -61,9 +68,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" 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"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" 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"/> @@ -71,7 +78,68 @@ <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"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -86,20 +154,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index 0ddb70a..054c970 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -20,6 +20,8 @@ </queryString> <field name="formatter" class="java.text.DecimalFormat"/> <field name="dateFormat" class="java.text.SimpleDateFormat"/> + <field name="forMonthText" class="java.lang.String"/> + <field name="subTotalForMonthText" class="java.lang.String"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> @@ -55,7 +57,7 @@ <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> + <textFieldExpression><![CDATA[String.format($F{forMonthText},new SimpleDateFormat("MMMM yyyy").format($F{period}))]]></textFieldExpression> </textField> </frame> </band> @@ -87,7 +89,7 @@ <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> + <textFieldExpression><![CDATA[String.format($F{subTotalForMonthText}, 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"/> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml index 7a1a5ac..9073360 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml @@ -26,6 +26,13 @@ <field name="generalLedgers" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -53,9 +60,9 @@ </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" 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"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" 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"/> @@ -63,7 +70,68 @@ <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"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -78,20 +146,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml index 9987b00..e8fe131 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml @@ -20,10 +20,10 @@ </queryString> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="totalForAccountText" class="java.lang.String"/> + <field name="accountNumber" class="java.lang.String"/> <field name="entries" class="java.util.List"/> - - <field name="accountNumber" class="java.lang.String"/> <field name="label" class="java.lang.String"/> <field name="debit" class="java.math.BigDecimal"/> <field name="credit" class="java.math.BigDecimal"/> @@ -100,6 +100,13 @@ <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> + <textField pattern=""> + <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> + <textElement> + <font size="8" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[String.format($F{totalForAccountText}, $F{accountNumber})]]></textFieldExpression> + </textField> <textField isBlankWhenNull="true"> <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> <textElement textAlignment="Right"> @@ -124,13 +131,6 @@ </textElement> <textFieldExpression><![CDATA[$F{balance}]]></textFieldExpression> </textField> - <textField pattern=""> - <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> - <textElement> - <font size="8" isBold="true"/> - </textElement> - <textFieldExpression><![CDATA["Total pour le compte " + $F{accountNumber}]]></textFieldExpression> - </textField> </frame> </band> </detail> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index ec1381b..ffb2283 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -25,6 +25,14 @@ defaultCloseOperation : {JDialog.DO_NOTHING_ON_CLOSE}; } +#identityTab { + title : {handler.getIdentityTabTitle()}; +} + +#treasuryTab { + title : {handler.getTreasuryTabTitle()}; +} + #nameLabel { text : "lima.identity.name"; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 936438d..7b69aef 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -42,7 +42,7 @@ <JTabbedPane id="identityContentTabbedPane" constraints="BorderLayout.CENTER"> - <tab id="identityTab" title="Identité"> + <tab id="identityTab"> <Table id="identityTable" fill="both"> <row> <cell anchor="east" weightx="1"> @@ -136,7 +136,7 @@ </Table> </tab> - <tab id="treasuryTab" title="Trésor Public"> + <tab id="treasuryTab"> <JPanel layout="{new BorderLayout()}"> <Table fill="both" constraints="BorderLayout.NORTH" insets="5"> <row> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index afda4ba..3771ca7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -31,6 +31,8 @@ import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; import org.chorem.lima.entity.Treasury; +import static org.nuiton.i18n.I18n.t; + public class IdentityHandler { protected IdentityService identityService; @@ -90,4 +92,14 @@ public class IdentityHandler { treasuryService.updateTreasury(treasury); } + + public String getIdentityTabTitle() { + String result = t("lima.identity"); + return result; + } + + public String getTreasuryTabTitle() { + String result = t("lima.treasury"); + return result; + } } 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 5eeb591..874305f 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,5 +1,4 @@ -Identit\\u00e9= -Tr\\u00e9sor\ Public= +lima-business.document.subTotalForMonthText=Sub total for %s lima.account=Account lima.account.add=Add account (Ctrl+A) lima.account.add.error.InvalidAccountNumber=Invalid account number\:%1$s @@ -20,12 +19,12 @@ lima.action.commandline.help=Show help in console lima.balance=Balance lima.cancel=Cancel lima.chart.accounts=Accounts chart -lima.chart.accounts.base=Base accountchart -lima.chart.accounts.developed=Developped accountchart +lima.chart.accounts.base=Base account chart +lima.chart.accounts.developed=Developed account chart lima.chart.accounts.import.csv=CSV customized accounting plan lima.chart.accounts.import.ebp=EBP customized accounting plan -lima.chart.accounts.shortened=Shorthened accountchart -lima.close= +lima.chart.accounts.shortened=Shortened account chart +lima.close=Close lima.closed=Closed lima.code=Code lima.config.category.directories=Directories @@ -196,7 +195,7 @@ lima.entryBook.add=Add entry book (Ctrl+A) lima.entryBook.alreadyExistEntryBook=Already existing entry book lima.entryBook.code=Code lima.entryBook.default=Default entry book -lima.entryBook.delete.used.error=Can't delete entry book %2$s (%1$s) because exist financcial transactions in this entry book. +lima.entryBook.delete.used.error=Can't delete entry book %2$s (%1$s) because exist financial transactions in this entry book. lima.entryBook.error.lockedEntryBook=Closed entry book %2$s (%1$s) for period from %3$te %3$tB %3$tY to %4$te %4$tB %4$tY. lima.entryBook.form=Entry book lima.entryBook.import=Importer @@ -265,7 +264,7 @@ lima.financialStatement.base=Base financial statement chart lima.financialStatement.check=Check accounts passing to movement lima.financialStatement.creditAccounts=Account credit list lima.financialStatement.debitAccounts=Account debit list -lima.financialStatement.developed=Developped financial statement chart +lima.financialStatement.developed=Developed financial statement chart lima.financialStatement.error.alreadyExistFinancialStatement=Failed\! Financial statement %s already exist lima.financialStatement.error.alreadyUsedVatBox=Failed\! VAT box with name '%s' is already used \! lima.financialStatement.header.add=Add category @@ -273,14 +272,14 @@ lima.financialStatement.header.form=Category lima.financialStatement.headerAmount=Calculate amount on header lima.financialStatement.import=Import lima.financialStatement.import.delete=Delete actual financial statement chart before import new -lima.financialStatement.import.description=NO financialstatement chart +lima.financialStatement.import.description=NO financial statement chart lima.financialStatement.label=Label lima.financialStatement.movement.add=Add movement lima.financialStatement.movement.form=Group lima.financialStatement.provisionDeprecationAccounts= lima.financialStatement.remove.confirm=Do you really want to remove this financial statement ? -lima.financialStatement.shortened=Shortened financialstatement chart -lima.financialStatement.subAmount=Calculate a subamount +lima.financialStatement.shortened=Shortened financial statement chart +lima.financialStatement.subAmount=Calculate a sub amount lima.financialStatement.way=Way lima.financialStatements=Financial statements lima.financialStatements.check=check account @@ -476,7 +475,7 @@ lima.open=Open lima.openEjb.remote.mode.description=Server started lima.openEjb.remote.mode.label=Server started lima.opening=Launching -lima.opening.accounts=<html><center>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html> +lima.opening.accounts=<html><center>Select a default, <br/>import your personal<br/> or cancel to create your own account chart.</center></html> lima.opening.close=Close lima.opening.end=Finish lima.opening.entryBook=Select it to import default entry books @@ -527,6 +526,7 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury=Tax authority administration lima.treasury.address=Address lima.treasury.address2=Address (next) lima.treasury.cdi=CDI @@ -535,7 +535,7 @@ lima.treasury.dossierNumber=File number lima.treasury.key=key lima.treasury.serviceCode=Service Code lima.treasury.sie=SIE -lima.treasury.systemType=Sytem Type +lima.treasury.systemType=System Type lima.treasury.vatNumber=VAT number lima.treasury.zipCode=Zip Code lima.update=Modify @@ -548,9 +548,9 @@ lima.vatStatement.boxName=PDF BoxName lima.vatStatement.default= lima.vatStatement.delete=Delete actual VAT statement chart before import new lima.vatStatement.delete.parent=Remove parent -lima.vatStatement.developed=Developped VAT statement chart +lima.vatStatement.developed=Developed VAT statement chart lima.vatStatement.error.alreadyExistVatStatement= -lima.vatStatement.import=Impport CSV +lima.vatStatement.import=Import CSV lima.vatStatement.import.delete= lima.vatStatement.import.description= lima.vatStatement.label=Label @@ -558,7 +558,7 @@ lima.vatStatement.master=Master VAT statement lima.vatStatement.movement=Movement lima.vatStatement.movement.add=Add movement lima.vatStatement.nothing=No vat statement chart -lima.vatStatement.remove.confirm=Do you realy want to remove line ? +lima.vatStatement.remove.confirm=Do you really want to remove line ? lima.vatStatement.remove.title=Remove line ? lima.vatStatement.shortened=Shortened vat statement chart lima.vatStatements=VAT statements -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit b4373cd69ed0adc9b183349ad0a7577386e3a687 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:13:36 2015 +0200 refs #1241mise à jour du plan de tva --- lima-swing/src/main/resources/import/vat_base.csv | 35 ++++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lima-swing/src/main/resources/import/vat_base.csv b/lima-swing/src/main/resources/import/vat_base.csv index 48bb9ee..0037341 100644 --- a/lima-swing/src/main/resources/import/vat_base.csv +++ b/lima-swing/src/main/resources/import/vat_base.csv @@ -1,14 +1,13 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Ventes, prestations de services;N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Acquisitions intracommunautaires;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Régularisations (imposables);N;;b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de prestations de services intracommunautaires;N;410;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) OPERATIONS NON IMPOSABLES;O;;;A. MONTANT DES OPERATIONS REALISEES Exportations hors CE;N;;b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES Autres opérations non imposables;N;;b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES @@ -20,10 +19,12 @@ Régularisations (non imposables);N;;b15;A. MONTANT DES OPERATIONS REALISEES/OPE B. DECOMPTE DE LA TVA A PAYER;O;;; TVA BRUTE;O;;;B. DECOMPTE DE LA TVA A PAYER Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE -Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b19;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Base hors taxe);N;;b20;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Taxe due);N;;b21;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Base hors taxe);N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Taxe due);N;44571;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM @@ -40,20 +41,26 @@ Total de le TVA brute due (lignes 08 à 5B);N;;b34;B. DECOMPTE DE LA TVA A PAYER Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) -TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER -Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER +Autres opérations imposables;N;;;B. DECOMPTE DE LA TVA A PAYER/CREDIT +CREDIT;N;;;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables Crédit de TVA (ligne 23 – ligne 16).;N;;b44;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Remboursement de crédit demandé sur formulaire n°3519 joint;N;;b45;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Crédit de TVA transféré à la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b46;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Crédit à reporter ( ligne 25 – ligne 26 – ligne AA );N;;b47;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER +Achats de prestations de services intracommunautaires;N;;;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER +TAXE A PAYER;N;;;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER +TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER +Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Sommes à imputer, y compris acompte congés (exprimées en euro);N;;b42;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Indiquer ici le coefficient de taxation forfaitaire;N;;taux;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Biens constituant des immobilisations;N;44562;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autres biens et services;N;44566;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Report du crédit apparaissant ligne 27 de la précédente déclaration;N;44567;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 21cbf7748f6e2fedbd3a0f22e8e8971258a3fa64 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:14:52 2015 +0200 refs #1241 minor --- .../src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index 3771ca7..3263ebb 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -76,7 +76,6 @@ public class IdentityHandler { identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); identity.setVatNumber(view.getVatNumberTextField().getText()); - identityService.updateIdentity(identity); Treasury treasury = treasuryService.getTreasury(); -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit e8e622ed5486d9932ddd4fbc6bf5fd3d72e1c08c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:14 2015 +0200 refs #1241 internationalisation sur le rapport de compte --- .../lima/business/ejb/report/AccountReportServiceImpl.java | 7 ++++--- .../src/main/resources/i18n/lima-business_en_GB.properties | 12 ++++++++++-- .../src/main/resources/i18n/lima-business_fr_FR.properties | 12 ++++++++++-- .../main/resources/jasperreports/account/AccountEntry.jrxml | 3 ++- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 1879a4b..94c74ff 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -82,6 +82,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); accountEntry.setFormatter(bigDecimalFormat); accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); + accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); accountEntries.add(accountEntry); } } @@ -89,11 +90,11 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += ", aucune entrée trouvée sur ce compte"; + selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); } else if (accountEntries.size() == 1){ - selectedAccounts += ", et son compte fils"; + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); } else { - selectedAccounts += ", et ses comptes fils"; + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); } documentReport.setHeaderSelectedAccounts(selectedAccounts); 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 f809c87..1c64e65 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 @@ -12,6 +12,9 @@ lima-business.document.amounts=Amounts lima-business.document.amountsperiod=Amounts %1$tB %1$tY lima-business.document.assets=Assets lima-business.document.balance=Balance +lima-business.document.balance.globalClient=CENTRALISATION CLIENTS +lima-business.document.balance.globalSupplier=CENTRALISATION SUPPLIERS +lima-business.document.balance.lastPageColumnDescription=Global total lima-business.document.balanceForEntryBook=Total for entry book %s until %s lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance @@ -66,6 +69,9 @@ lima-business.document.period2=to lima-business.document.period2format=%1$tm/%1$te/%1$tY lima-business.document.provisionalEntryBookReport.title=PROVISIONAL ENTRY BOOK lima-business.document.provisiondeprecationamount=Provision Deprecation Amount +lima-business.document.selectedAccountAndSubAccount=, and it sub account +lima-business.document.selectedAccountAndSubAccounts=, and it sub accounts +lima-business.document.selectedAccountNoEntryFound=, no entry found lima-business.document.setColumnDateTitle=Date lima-business.document.setColumnEntryBookTitle=Entry book lima-business.document.society=Society @@ -74,12 +80,12 @@ lima-business.document.soldecredit=Credit solde lima-business.document.soldedebit=Debit solde lima-business.document.subTotal=Sub total lima-business.document.subTotalFor=Sub total for %s -lima-business.document.subTotalForMonthText= +lima-business.document.subTotalForMonthText=Sub total for % lima-business.document.titleCompanyPhoneLabel=Phone\: lima-business.document.titleCompanySiretLabel=Business N°\: lima-business.document.titleCurrentDate=Printed on %s at %s lima-business.document.titleFromToDate=From %s to %s -lima-business.document.totalFor=total for\: +lima-business.document.totalFor=Total for %s lima-business.document.totalForAccount=Total for account %s lima-business.document.vat=VAT form lima-business.document.vatnumber=VAT N° @@ -115,6 +121,8 @@ lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description lima.config.documentReport.generalLedger.generalLedgerModelPath.description= lima.config.host.address.description= lima.config.httpport.description=HTTP Port +lima.config.local.description= +lima.config.local.label= lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= lima.config.rulesnationality.description=Rules Nationality 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 bfabd31..49dd9cb 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 @@ -10,6 +10,9 @@ lima-business.document.amounts=Totaux lima-business.document.amountsperiod=Totaux %1$tB %1$tY lima-business.document.assets=avoirs lima-business.document.balance=Balance +lima-business.document.balance.globalClient=CENTRALISATION CLIENTS +lima-business.document.balance.globalSupplier=CENTRALISATION FOURNISSEURS +lima-business.document.balance.lastPageColumnDescription=Total général lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance @@ -64,6 +67,9 @@ lima-business.document.period2=au lima-business.document.period2format=%1$te/%1$tm/%1$tY lima-business.document.provisionalEntryBookReport.title=JOURNAL PROVISOIRE lima-business.document.provisiondeprecationamount=Amortissements et provisions +lima-business.document.selectedAccountAndSubAccount=, et son compte fils +lima-business.document.selectedAccountAndSubAccounts=, et ses comptes fils +lima-business.document.selectedAccountNoEntryFound=, aucune entrée trouvée sur ce compte lima-business.document.setColumnDateTitle=Date lima-business.document.setColumnEntryBookTitle=Journal lima-business.document.society=Nom @@ -71,13 +77,13 @@ lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur lima-business.document.subTotal=Sous total -lima-business.document.subTotalFor=Sous total pour %s +lima-business.document.subTotalFor=Sous-total pour %s lima-business.document.subTotalForMonthText=Sous-total pour le mois de %s lima-business.document.titleCompanyPhoneLabel=Téléphone\: lima-business.document.titleCompanySiretLabel=SIRET\: lima-business.document.titleCurrentDate=Édition du %s à %s lima-business.document.titleFromToDate=Du %s au %s -lima-business.document.totalFor=total pour\: +lima-business.document.totalFor=Total pour %s lima-business.document.totalForAccount=Total pour le compte %s lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA @@ -119,6 +125,8 @@ lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description 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 LIMA lima.config.host.http.port.description=Port HTTP +lima.config.local.description= +lima.config.local.label= lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport lima.config.rulesnationality.description=Règles nationales diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml index f800454..15b1213 100644 --- a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -27,6 +27,7 @@ <field name="lettering" class="java.lang.String"/> <field name="debit" class="java.math.BigDecimal"/> <field name="credit" class="java.math.BigDecimal"/> + <field name="subTotalForLabel" class="java.lang.String"/> <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> @@ -213,7 +214,7 @@ <textElement> <font size="8"/> </textElement> - <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{subTotalForLabel}]]></textFieldExpression> </textField> <textField> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 5a144b57c3704298550de84c67656d0da796ab55 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:41 2015 +0200 refs #1241 internationalisation sur le rapport de compte --- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 61424 -> 61665 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 790db87..85b1c37 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 887373c77477f6f7919b0c05009b679ca385de4d Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:30 2015 +0200 refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) --- .../chorem/lima/business/api/OptionsService.java | 3 + .../business/api/report/BalanceReportService.java | 3 +- .../chorem/lima/business/LimaBusinessConfig.java | 11 ++- .../lima/business/ejb/OptionsServiceImpl.java | 6 ++ .../ejb/report/BalanceReportServiceImpl.java | 110 ++++++++++++++++++--- .../org/chorem/lima/beans/BalanceAccountImpl.java | 23 +++-- .../lima/report/service/DocumentService.java | 8 +- .../balance/BalanceSubAccountsReport.jrxml | 14 +-- .../jasperreports/balance/DocumentReport.jrxml | 81 +++++++++++++++ .../org/chorem/lima/report/action/ReportTest.java | 2 +- .../org/chorem/lima/server/HttpServerService.java | 40 +++++--- .../main/java/org/chorem/lima/LimaSwingConfig.java | 1 + 12 files changed, 248 insertions(+), 54 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 6598454..44ce1e2 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 @@ -24,6 +24,8 @@ package org.chorem.lima.business.api; import org.chorem.lima.business.config.LimaConfigOptionDef; import org.chorem.lima.business.utils.BigDecimalToString; +import java.util.Locale; + /** * Service de report des certaines configurations du swing dans business * <p/> @@ -57,4 +59,5 @@ public interface OptionsService extends BigDecimalToString.Config { int getLimaHttpPort(); + void setLocal(Locale newLocale); } 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 016e01c..b284fb4 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 @@ -39,10 +39,11 @@ public interface BalanceReportService { * @param from from date * @param to to date * @param selectedAccounts if null all accounts will be selected + * @Param isBalanceGeneral true if general Balance is requested * @param bigDecimalFormat format used for amount representation * @param mainAccountsJasperReport Jasper sub report for balance's main accounts representation * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneral, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java index c7beb4f..c3ecca2 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java @@ -37,6 +37,7 @@ import org.nuiton.topia.flyway.TopiaFlywayService; import org.nuiton.topia.persistence.TopiaConfigurationConstants; import java.io.File; +import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -225,7 +226,14 @@ public class LimaBusinessConfig { loadAccountingRules(); } + public Locale getLocal() { + return config.getOptionAsLocale(BusinessConfigOption.LOCAL.key); + } + public void setLocal(Locale local) { + config.setOption(BusinessConfigOption.LOCAL.key, local.toString()); + saveConfig(); + } public int getScale() { return config.getOptionAsInt(BusinessConfigOption.SCALE.key); @@ -343,9 +351,10 @@ public class LimaBusinessConfig { HOST_EJB_BIND("lima.host.ejb.bind", "", "0.0.0.0", String.class, false, false), HOST_EJB_PORT("lima.host.ejb.port", n("lima.host.ejb.port.description"), "4202", Integer.class, false, false), - HOST_HTTP_ADDRESS("lima.host.http.address", n("lima.host.http.address.description"), "localhost", Integer.class, false, false), + HOST_HTTP_ADDRESS("lima.host.http.address", n("lima.host.http.address.description"), "localhost", String.class, false, false), HOST_HTTP_PORT("lima.host.http.port", n("lima.host.http.port.description"), "5462", Integer.class, false, false), + LOCAL("lima.config.local", t("lima.config.local.label"), n("lima.config.local.description"), Locale.FRANCE.toString() , Locale.class, false, false), SCALE("lima.data.bigDecimal.scale", t("lima.config.scale.label"), n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", t("lima.config.currency.label"), n("lima.config.currency.description"), "false", Boolean.class, false, false), DATE_FORMAT("lima.config.dateFormat", t("lima.config.dateFormat.label"), n("lima.config.dateFormat.description"), "DD/MM/YYYY", Boolean.class, false, false), 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 8cbfae8..e4fec31 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 @@ -27,6 +27,7 @@ import org.chorem.lima.business.config.LimaConfigOptionDef; import javax.ejb.Remote; import javax.ejb.Stateless; +import java.util.Locale; @Stateless @Remote(OptionsService.class) @@ -102,4 +103,9 @@ public class OptionsServiceImpl extends AbstractLimaService implements OptionsSe return LimaBusinessConfig.getInstance().getHostHttpPort(); } + @Override + public void setLocal(Locale local) { + LimaBusinessConfig.getInstance().setLocal(local); + } + } 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 ff5af26..a9da2e0 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 @@ -76,6 +76,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal protected IdentityService identityService; protected static final Integer ACCOUNT_NUMBER_SIZE = 6; + protected static final String GROUP_401 = "401"; + protected static final String GROUP_411 = "411"; protected static final Predicate<BalanceAccount> HAS_NO_ENTRY = new Predicate<BalanceAccount>() { @@ -90,7 +92,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneralSt, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { String reportName = t("lima-business.document.balanceReport.title"); DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); @@ -103,6 +105,15 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); + + boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + + BigDecimal globalDebit = BigDecimal.ZERO; + BigDecimal globalCredit = BigDecimal.ZERO; + BigDecimal globalDebitBalance = BigDecimal.ZERO; + BigDecimal globalCreditBalance = BigDecimal.ZERO; + BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -128,30 +139,103 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal setDocumentReportHeaderSelectedAccounts(documentReport, accounts); HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); + + BalanceAccount sold401 = null; + BalanceAccount sold411 = null; + for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - BalanceAccountImpl accountSubAccounts = accountsByClasses.get(accountClass); - if (accountSubAccounts == null) { - accountSubAccounts = new BalanceAccountImpl(); - accountSubAccounts.setFormatter(bigDecimalFormat); - accountSubAccounts.setSubReport(subAccountsJasperReport); - accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); - accountsByClasses.put(accountClass, accountSubAccounts); - returnedAccounts.add(accountSubAccounts); - } + // all results for a account classes + BalanceAccountImpl accountSubAccounts = getBalanceAccountForAccountClass(bigDecimalFormat, subAccountsJasperReport, returnedAccounts, accountsByClasses, accountClass); + + // compute balance for the account classes BalanceAccount subClassAccount = computeSubAccountBalance(accountClass, account, from, to, bigDecimalFormat); + + // only add it if there are results if (subClassAccount != null) { - accountSubAccounts.addSubAccount(subClassAccount); + // we group Account 401 and 411 with there sub accounts + String accountNb = account.getAccountNumber(); + + if (isBalanceGeneral && ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411)))){ + BalanceAccount balanceAccount = null; + if ((accountNb.startsWith(GROUP_401))){ + if (sold401 == null) { + sold401 = new BalanceAccountImpl(); + sold401.setLabel(t("lima-business.document.balance.globalSupplier")); + sold401.setFormatter(bigDecimalFormat); + sold401.setAccountNumber("4010000"); + accountSubAccounts.addSubAccount(sold401); + } + balanceAccount = sold401; + } else if((accountNb.startsWith(GROUP_411))) { + if (sold411 == null) { + sold411 = new BalanceAccountImpl(); + sold411.setLabel(t("lima-business.document.balance.globalClient")); + sold411.setFormatter(bigDecimalFormat); + sold411.setAccountNumber("4110000"); + accountSubAccounts.addSubAccount(sold411); + } + balanceAccount = sold411; + } + + if (balanceAccount != null) { + // add amounts to global 4 account + addInWith(accountSubAccounts, subClassAccount); + + // add amounts to 401 or 411 global amount + addInWith(balanceAccount, subClassAccount); + + // add amounts to global result + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } + + } else { + accountSubAccounts.addSubAccount(subClassAccount); + + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } } } } Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); documentReport.addAllMainAccounts(returnedAccounts); + + documentReport.setTotalDebit(globalDebit); + documentReport.setTotalCredit(globalCredit); + documentReport.setDebitBalance(globalDebitBalance); + documentReport.setCreditBalance(globalCreditBalance); + return documentReport; } + protected void addInWith(BalanceAccount target, BalanceAccount toBeAdded) { + target.setAmountDebit(target.getAmountDebit().add(toBeAdded.getAmountDebit())); + target.setAmountCredit(target.getAmountCredit().add(toBeAdded.getAmountCredit())); + target.setDebitBalance(target.getDebitBalance().add(toBeAdded.getDebitBalance())); + target.setCreditBalance(target.getCreditBalance().add(toBeAdded.getCreditBalance())); + } + + protected BalanceAccountImpl getBalanceAccountForAccountClass(DecimalFormat bigDecimalFormat, JasperReport subAccountsJasperReport, Collection<BalanceAccount> returnedAccounts, HashMap<String, BalanceAccountImpl> accountsByClasses, String accountClass) { + BalanceAccountImpl accountSubAccounts = accountsByClasses.get(accountClass); + if (accountSubAccounts == null) { + accountSubAccounts = new BalanceAccountImpl(); + accountSubAccounts.setFormatter(bigDecimalFormat); + accountSubAccounts.setSubReport(subAccountsJasperReport); + accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); + accountsByClasses.put(accountClass, accountSubAccounts); + returnedAccounts.add(accountSubAccounts); + } + return accountSubAccounts; + } + protected void setDocumentReportHeaderSelectedAccounts(DocumentReport documentReport, List<Account> accounts) { Account fromAccount = accounts.get(0); Account toAccount = accounts.get(accounts.size()-1); @@ -196,7 +280,6 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceAccount balanceAccount = addSubAccountReport(mainAccountLabel, account, bigDecimalFormat, credit, debit, balance); - return balanceAccount; } @@ -216,10 +299,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal if (balance.compareTo(BigDecimal.ZERO) == 1) { balanceAccount.setDebitBalance(balance.abs()); - balanceAccount.setCreditBalance(BigDecimal.ZERO); } else { balanceAccount.setCreditBalance(balance.abs()); - balanceAccount.setDebitBalance(BigDecimal.ZERO); } balanceAccount.setAmountCredit(credit); @@ -227,4 +308,5 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal } return balanceAccount; } + } diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java index de819dc..2e1bdde 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java @@ -29,24 +29,23 @@ public class BalanceAccountImpl extends BalanceAccount { private static final long serialVersionUID = 1L; + public BalanceAccountImpl() { + this.amountDebit = BigDecimal.ZERO; + this.amountCredit = BigDecimal.ZERO; + this.debitBalance = BigDecimal.ZERO; + this.creditBalance = BigDecimal.ZERO; + } + public void addSubAccount(BalanceAccount subAccount) { // we only add account that have values if (subAccount.getAmountDebit() != null && subAccount.getAmountCredit() != null) { getSubAccounts().add(subAccount); - BigDecimal newAmountDebit = this.amountDebit == null ? BigDecimal.ZERO : this.amountDebit; - BigDecimal newAmountCredit = this.amountCredit == null ? BigDecimal.ZERO : this.amountCredit; - BigDecimal newSoldeDebit = this.debitBalance == null ? BigDecimal.ZERO : this.debitBalance; - BigDecimal newSoldeCredit = this.creditBalance == null ? BigDecimal.ZERO : this.creditBalance; - - this.amountDebit = subAccount.getAmountDebit().add(newAmountDebit); - - this.amountCredit = subAccount.getAmountCredit().add(newAmountCredit); - - this.debitBalance = subAccount.getDebitBalance().add(newSoldeDebit); - - this.creditBalance = subAccount.getCreditBalance().add(newSoldeCredit); + this.amountDebit = this.amountDebit.add(subAccount.getAmountDebit()); + this.amountCredit = this.amountCredit.add(subAccount.getAmountCredit()); + this.debitBalance = this.debitBalance.add(subAccount.getDebitBalance()); + this.creditBalance = this.creditBalance.add(subAccount.getCreditBalance()); } // firePropertyChange(PROPERTY_SUB_ACCOUNTS, null, subAccount); diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 40ef663..37206ec 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -472,10 +472,10 @@ public class DocumentService { //############## balance ############## - public void createBalanceDocuments(Date beginDate, Date endDate, String fromToAccount) { + public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneral, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); JasperReport balanceSubAccountsReport = jasperReports.getBalanceSubAccountsReport(); - DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, + DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, isBalanceGeneral, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); jasperReports.generatePDFReport(DocumentsEnum.BALANCE, balanceFilePath, Lists.newArrayList(report)); } @@ -520,13 +520,13 @@ public class DocumentService { return inputStream; } - public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account, String autocomplete) throws IOException { + public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account, String isBalanceGeneral, String autocomplete) throws IOException { String stringResult = null; //create docs switch (DocumentsEnum.valueOfLink(model)) { case BALANCE: - createBalanceDocuments(beginDate, endDate, null); + createBalanceDocuments(beginDate, endDate, isBalanceGeneral, null); break; case ACCOUNT: createAccountDocument(account, beginDate, endDate); diff --git a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml index 4f8896d..3b7611c 100644 --- a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-07-02T18:03:10 --> +<!-- 2015-09-07T13:45: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="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"/> @@ -11,7 +11,6 @@ <![CDATA[]]> </queryString> <field name="formatter" class="java.text.DecimalFormat"/> - <field name="accountNumber" class="java.lang.String"/> <field name="label" class="java.lang.String"/> <field name="amountDebit" class="java.math.BigDecimal"/> @@ -21,7 +20,6 @@ <field name="mainAccountLabel" class="java.lang.String"/> <field name="totalForLabel" class="java.lang.String"/> <field name="subTotalForLabel" class="java.lang.String"/> - <variable name="amountBalanceDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{amountDebit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> @@ -162,7 +160,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA[$F{subTotalForLabel} + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{subTotalForLabel}, $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"> @@ -172,7 +170,6 @@ <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{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -208,7 +205,7 @@ <textFieldExpression><![CDATA[new Boolean($V{sumBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceCredit}) : ""]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> - <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="7f9a6117-e3b4-492f-ba5a-b4f913516294"> + <reportElement key="" isPrintRepeatedValues="false" 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"/> @@ -217,7 +214,6 @@ <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{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -289,7 +285,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA[$F{totalForLabel} + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{totalForLabel}, $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"> @@ -299,7 +295,6 @@ <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{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -344,7 +339,6 @@ <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{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index bc37ab4..9cb88c4 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -14,10 +14,22 @@ <rightPen lineWidth="0.6" lineColor="#804000"/> </box> </style> + + <style name="FooterHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="FooterColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <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> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="mainAccounts" class="java.util.List"/> @@ -44,6 +56,14 @@ <field name="columnDebitTitle" class="java.lang.String"/> <field name="columnDescriptionTitle" class="java.lang.String"/> <field name="columnTotalForPeriodTitle" class="java.lang.String"/> + + <field name="lastPageColumnDescription" class="java.lang.String"/> + + <field name="totalDebit" class="java.math.BigDecimal"/> + <field name="totalCredit" class="java.math.BigDecimal"/> + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> + <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> @@ -260,4 +280,65 @@ </textField> </band> </pageFooter> + <lastPageFooter> + <band height="30"> + <frame> + <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true"/> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="0" y="0" width="434" height="20"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="12" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA[$F{lastPageColumnDescription}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="290" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{totalDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{totalDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="362" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{totalCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{totalCredit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="434" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="506" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> + </textField> + </frame> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="20" width="288" height="10"/> + <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"/> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java b/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java index 5826982..a8d1f56 100644 --- a/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java +++ b/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java @@ -55,6 +55,6 @@ public class ReportTest { Date beginDateFormat = df.parse("01/01/2013"); Date endDateFormat = df.parse("31/12/2014"); DocumentService documentService = new DocumentService(); - documentService.createBalanceDocuments(beginDateFormat, endDateFormat, null); + documentService.createBalanceDocuments(beginDateFormat, endDateFormat, null, null); } } diff --git a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java index 127a6b5..eaa9a13 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java +++ b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; +import org.chorem.lima.business.LimaBusinessConfig; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.entity.Account; @@ -58,6 +59,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Locale; import static org.nuiton.i18n.I18n.t; @@ -140,13 +142,13 @@ public class HttpServerService { String endDate = req.getParameter("endDate"); String account = (StringUtils.isBlank(req.getParameter("account")) ? null : URLDecoder.decode(req.getParameter("account"), "UTF-8")); String autocomplete = req.getParameter("autocomplete") == null ? "true" : req.getParameter("autocomplete"); - + String isGeneral = req.getParameter("isGeneral") == null ? "true" : req.getParameter("isGeneral"); if (imageParam != null) { // render image doImage(resp, imageParam); } else if (model != null && beginDate != null && endDate != null) { // generate and render report - doCreateReport(resp, model, beginDate, endDate, account, autocomplete); + doCreateReport(resp, model, beginDate, endDate, account, isGeneral, autocomplete); } else { // render home HTML doHomeHtml(req, resp); @@ -168,7 +170,7 @@ public class HttpServerService { } protected void doCreateReport(HttpServletResponse resp, String model, String beginDate, String endDate, - String account, String autocomplete) throws IOException { + String account, String isGeneral, String autocomplete) throws IOException { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); @@ -178,7 +180,7 @@ public class HttpServerService { Date endDateFormat = sdf.parse(endDate); GeneratedReport generatedReport = - documentService.createReport(beginDateFormat, endDateFormat, model, account, autocomplete); + documentService.createReport(beginDateFormat, endDateFormat, model, account, isGeneral, autocomplete); if (Strings.isNullOrEmpty(generatedReport.getHtmlContent())) { InputStream in = generatedReport.getPdfStream(); @@ -225,7 +227,11 @@ public class HttpServerService { beginDatePicker = DateUtils.truncate(beginDatePicker, Calendar.YEAR); - pageContent.append("<!DOCTYPE html>\n" + "<html lang=\"fr\">\n" + Locale locale = LimaBusinessConfig.getInstance().getLocal(); + + pageContent.append("<!DOCTYPE html>\n" + "<html lang=\""); + pageContent.append(locale.getLanguage()); + pageContent.append("\">\n" + "<head>\n" + "<script type=\"text/javascript\">" + " function showAccountInput(){" + @@ -239,8 +245,18 @@ public class HttpServerService { " document.getElementById('accountField').style.display = 'none';" + " }" + " }" + + " var request = document.getElementById('model');" + + " var requestValue = request == null ? '': request.value;" + + " var isDocumentBalance = requestValue === 'lima_balance'; " + + " if (document.getElementById('balanceType') != null) {" + + " if (isDocumentBalance) {" + + " document.getElementById('balanceType').style.display = 'block';" + + " } else {" + + " document.getElementById('balanceType').style.display = 'none';" + + " }" + + " }" + " }" + - " showAccountInput();" + + " showAccountInput();" + " </script>" + "<title>LIMA Documents Report</title>\n" + "<style type=\"text/css\">" + "body { font: 14px sans-serif; }" + "h1 { font: 20px sans-serif; text-align: center; }" + "table.padding td {padding-right:20px;}" + ".tdright {text-align: right;}" + "</style>" + "</head>\n" @@ -255,11 +271,8 @@ public class HttpServerService { .append("<input value=\"") .append(sdf.format(endDatePicker)) .append("\" type=\"date\" name=\"endDate\">\n<br/><br/>"); - //+ "Format : <select name=\"format\">"); - - pageContent.append(/*"</select>\n" - + */"Documents : <select id=\"model\" name=\"model\" onchange='showAccountInput()'>"); + pageContent.append("Documents : <select id=\"model\" name=\"model\" onchange='showAccountInput()'>"); for (DocumentsEnum documentsEnum : DocumentsEnum.values()) { pageContent.append("<option value=\"") @@ -278,10 +291,15 @@ public class HttpServerService { optionAccounts.append("</option>\n"); } - pageContent.append("</select>" + pageContent.append( "</select>" + "<div id='accountField'>Compte : <select id=\"account\" name=\"account\">" + optionAccounts.toString() + "</select></div>" + + "<div id='balanceType'>" + + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>Balance Générale\n" + + " <br>\n" + + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">Balance Globale" + + "</div>" + "<input type=\"submit\">\n" + "</form></td>" + "<tr><td class=\"tdright\"><img src=\"?img=entries.png\"/></td></tr>\n" 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 740f3ae..f1af0d0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java @@ -172,6 +172,7 @@ public class LimaSwingConfig extends ApplicationConfig implements BigDecimalToSt */ public void setLocale(Locale newLocale) { setOption(Option.LOCALE.key, newLocale.toString()); + optionsService.setLocal(newLocale); saveForUser(); firePropertyChange("locale", null, newLocale); } -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit b8a6ceb2670186b6b079c3b7ed4b8140dedec6ba Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:50 2015 +0200 refs #1241 monté de version je Jasper report --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 618b24a..2ff29d5 100644 --- a/pom.xml +++ b/pom.xml @@ -198,7 +198,7 @@ <h2Version>1.3.176</h2Version> <hibernateVersion>4.3.7.Final</hibernateVersion> <itextVersion>4.2.1</itextVersion> - <jasperreportsVersion>6.0.3</jasperreportsVersion> + <jasperreportsVersion>6.1.1</jasperreportsVersion> <javaxServletVersion>3.1.0</javaxServletVersion> <jaxxVersion>2.26</jaxxVersion> <jbossTransactionVersion>1.0.0.Final</jbossTransactionVersion> -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 6f487bfcfab4a1c2775746c314e14b9387992465 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 9 15:21:41 2015 +0200 refs #1241 refactoring de code --- .../business/api/report/BalanceReportService.java | 15 +- .../ejb/report/BalanceReportServiceImpl.java | 190 +++++++++++++++------ .../lima/report/service/DocumentService.java | 21 ++- 3 files changed, 171 insertions(+), 55 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 b284fb4..1a23f70 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 @@ -45,5 +45,18 @@ public interface BalanceReportService { * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneral, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + + /** + * + * @param from + * @param to + * @param selectedAccounts + * @param bigDecimalFormat + * @param mainAccountsJasperReport + * @param subAccountsJasperReport + * @return + */ + DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + } 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 a9da2e0..dbf7208 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 @@ -66,6 +66,8 @@ import static org.nuiton.i18n.I18n.t; @TransactionAttribute public class BalanceReportServiceImpl extends AbstractLimaService implements BalanceReportService { + public static final String GLOBAL_401_ACCOUNT_NUMBER = "4010000"; + public static final String GLOBAL_411_ACCOUNT_NUMBER = "4110000"; @EJB protected FinancialPeriodService financialPeriodService; @@ -92,46 +94,64 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneralSt, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { String reportName = t("lima-business.document.balanceReport.title"); - DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); - documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); - documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); - documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); - documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); + BalanceTrial balanceTrial = new BalanceTrialImpl(); + balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); - boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + List<Account> accounts = getAccounts(selectedAccounts); - BigDecimal globalDebit = BigDecimal.ZERO; - BigDecimal globalCredit = BigDecimal.ZERO; - BigDecimal globalDebitBalance = BigDecimal.ZERO; - BigDecimal globalCreditBalance = BigDecimal.ZERO; + Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(accounts)) { + Collections.sort(accounts, new AccountComparator()); - BalanceTrial balanceTrial = new BalanceTrialImpl(); - balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + setDocumentReportHeaderSelectedAccounts(documentReport, accounts); - AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - //for each account create a balance sheet with a ReportsDatas + HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); - List<Account> accounts; + //for each account create a balance sheet with a ReportsDatas + for (Account account : accounts) { + String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - //Remove Spaces - selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts); + // all results for a account classes + BalanceAccountImpl accountSubAccounts = getBalanceAccountForAccountClass(bigDecimalFormat, subAccountsJasperReport, returnedAccounts, accountsByClasses, accountClass); - // find all if none specified - if (StringUtils.isBlank(selectedAccounts)) { - accounts = accountTopiaDao.findAll(); - } else { - accounts = accountService.stringToListAccounts(selectedAccounts); + // compute balance for the account classes + BalanceAccount subClassAccount = computeSubAccountBalance(accountClass, account, from, to, bigDecimalFormat); + + // only add it if there are results + if (subClassAccount != null) { + accountSubAccounts.addSubAccount(subClassAccount); + + balanceGlobalResult.addSubClassAccounts(subClassAccount); + } + } } + Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); + documentReport.addAllMainAccounts(returnedAccounts); + + setDocumentReportGlobalBalance(documentReport, balanceGlobalResult); + + return documentReport; + } + + @Override + public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.balanceReport.title"); + DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); + + BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); + + BalanceTrial balanceTrial = new BalanceTrialImpl(); + balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + + List<Account> accounts = getAccounts(selectedAccounts); + Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accounts)) { Collections.sort(accounts, new AccountComparator()); @@ -143,6 +163,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceAccount sold401 = null; BalanceAccount sold411 = null; + //for each account create a balance sheet with a ReportsDatas for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); @@ -157,23 +178,17 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal // we group Account 401 and 411 with there sub accounts String accountNb = account.getAccountNumber(); - if (isBalanceGeneral && ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411)))){ - BalanceAccount balanceAccount = null; + BalanceAccount balanceAccount = null; + if ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411))){ if ((accountNb.startsWith(GROUP_401))){ if (sold401 == null) { - sold401 = new BalanceAccountImpl(); - sold401.setLabel(t("lima-business.document.balance.globalSupplier")); - sold401.setFormatter(bigDecimalFormat); - sold401.setAccountNumber("4010000"); + sold401 = getGlobalBalance4x(bigDecimalFormat, t("lima-business.document.balance.globalSupplier"), GLOBAL_401_ACCOUNT_NUMBER); accountSubAccounts.addSubAccount(sold401); } balanceAccount = sold401; } else if((accountNb.startsWith(GROUP_411))) { if (sold411 == null) { - sold411 = new BalanceAccountImpl(); - sold411.setLabel(t("lima-business.document.balance.globalClient")); - sold411.setFormatter(bigDecimalFormat); - sold411.setAccountNumber("4110000"); + sold411 = getGlobalBalance4x(bigDecimalFormat, t("lima-business.document.balance.globalClient"), GLOBAL_411_ACCOUNT_NUMBER); accountSubAccounts.addSubAccount(sold411); } balanceAccount = sold411; @@ -187,19 +202,12 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal addInWith(balanceAccount, subClassAccount); // add amounts to global result - globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); - globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); - globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); - globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + balanceGlobalResult.addSubClassAccounts(subClassAccount); } - } else { accountSubAccounts.addSubAccount(subClassAccount); - globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); - globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); - globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); - globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + balanceGlobalResult.addSubClassAccounts(subClassAccount); } } } @@ -208,11 +216,53 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); documentReport.addAllMainAccounts(returnedAccounts); - documentReport.setTotalDebit(globalDebit); - documentReport.setTotalCredit(globalCredit); - documentReport.setDebitBalance(globalDebitBalance); - documentReport.setCreditBalance(globalCreditBalance); + setDocumentReportGlobalBalance(documentReport, balanceGlobalResult); + + return documentReport; + } + + protected BalanceAccount getGlobalBalance4x(DecimalFormat bigDecimalFormat, String label, String accountNumber) { + BalanceAccount sold401 = new BalanceAccountImpl(); + sold401.setLabel(label); + sold401.setFormatter(bigDecimalFormat); + sold401.setAccountNumber(accountNumber); + return sold401; + } + + protected List<Account> getAccounts(String selectedAccounts) { + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + List<Account> accounts; + + selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts); + // find all if none specified + if (StringUtils.isBlank(selectedAccounts)) { + accounts = accountTopiaDao.findAll(); + } else { + accounts = accountService.stringToListAccounts(selectedAccounts); + } + return accounts; + } + + protected void setDocumentReportGlobalBalance(DocumentReport documentReport, BalanceGlobalResult globalBalanceResult) { + documentReport.setTotalDebit(globalBalanceResult.globalDebit); + documentReport.setTotalCredit(globalBalanceResult.globalCredit); + documentReport.setDebitBalance(globalBalanceResult.globalDebitBalance); + documentReport.setCreditBalance(globalBalanceResult.globalCreditBalance); + } + + protected DocumentReport getBalanceDocumentReport(Date from, Date to, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, String reportName) { + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + + documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); return documentReport; } @@ -309,4 +359,42 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal return balanceAccount; } + private class BalanceGlobalResult { + private BigDecimal globalDebit; + private BigDecimal globalCredit; + private BigDecimal globalDebitBalance; + private BigDecimal globalCreditBalance; + + public BigDecimal getGlobalDebit() { + return globalDebit; + } + + public BigDecimal getGlobalCredit() { + return globalCredit; + } + + public BigDecimal getGlobalDebitBalance() { + return globalDebitBalance; + } + + public BigDecimal getGlobalCreditBalance() { + return globalCreditBalance; + } + + public BalanceGlobalResult invoke() { + globalDebit = BigDecimal.ZERO; + globalCredit = BigDecimal.ZERO; + globalDebitBalance = BigDecimal.ZERO; + globalCreditBalance = BigDecimal.ZERO; + return this; + } + + public void addSubClassAccounts(BalanceAccount subClassAccount) { + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } + + } } diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 37206ec..ae35415 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -472,14 +472,29 @@ public class DocumentService { //############## balance ############## - public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneral, String fromToAccount) { + public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneralSt, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); JasperReport balanceSubAccountsReport = jasperReports.getBalanceSubAccountsReport(); - DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, isBalanceGeneral, - getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + + DocumentReport report = getDocumentReport(beginDate, endDate, fromToAccount, balanceMainAccountsReport, balanceSubAccountsReport, isBalanceGeneralSt); + jasperReports.generatePDFReport(DocumentsEnum.BALANCE, balanceFilePath, Lists.newArrayList(report)); } + protected DocumentReport getDocumentReport(Date beginDate, Date endDate, String fromToAccount, JasperReport balanceMainAccountsReport, JasperReport balanceSubAccountsReport, String isBalanceGeneralSt) { + boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + + DocumentReport report; + if (isBalanceGeneral) { + report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, + getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + } else { + report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, + getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + } + return report; + } + //############## EntryBook ############# public void createEntryBooksDocuments(Date beginDate, Date endDate, List<String> entryBookCodes) { JasperReport entryBookEntryBooksReport = jasperReports.getEntryBookEntryBooksReport(); -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 1179c093d61c0c745d73f11a86f658066f078421 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:34:40 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. --- .../src/main/java/org/chorem/lima/report/service/DocumentService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index ae35415..9eea4b4 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -486,10 +486,10 @@ public class DocumentService { DocumentReport report; if (isBalanceGeneral) { - report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, + report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); } else { - report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, + report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); } 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 develop in repository lima. See http://git.chorem.org/lima.git commit 4e94d244f52771c681529ceda1a781cb914ec610 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:35:19 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. --- .../business/api/report/BalanceReportService.java | 23 ++++++++++++---------- .../ejb/report/BalanceReportServiceImpl.java | 8 ++++---- .../resources/i18n/lima-business_en_GB.properties | 3 ++- .../resources/i18n/lima-business_fr_FR.properties | 3 ++- 4 files changed, 21 insertions(+), 16 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 1a23f70..4bd5c75 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 @@ -33,8 +33,9 @@ import java.util.Date; */ public interface BalanceReportService { + /** - * Generate the necessary beans to make balance report. + * Generate the necessary beans to make global balance report. * * @param from from date * @param to to date @@ -45,18 +46,20 @@ public interface BalanceReportService { * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); /** + * Generate the necessary beans to make balance report. * - * @param from - * @param to - * @param selectedAccounts - * @param bigDecimalFormat - * @param mainAccountsJasperReport - * @param subAccountsJasperReport - * @return + * @param from from date + * @param to to date + * @param selectedAccounts if null all accounts will be selected + * @Param isBalanceGeneral true if general Balance is requested + * @param bigDecimalFormat format used for amount representation + * @param mainAccountsJasperReport Jasper sub report for balance's main accounts representation + * @param subAccountsJasperReport Jasper sub account report for balance sub account representation + * @return model for balance report */ - DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); } 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 dbf7208..9f3ec87 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 @@ -94,8 +94,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima-business.document.balanceReport.title"); + public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.globalBalanceReport.title"); DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); @@ -141,8 +141,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal } @Override - public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima-business.document.balanceReport.title"); + public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.generalBalanceReport.title"); DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); 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 1c64e65..2fd01cb 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 @@ -16,7 +16,6 @@ lima-business.document.balance.globalClient=CENTRALISATION CLIENTS lima-business.document.balance.globalSupplier=CENTRALISATION SUPPLIERS lima-business.document.balance.lastPageColumnDescription=Global total lima-business.document.balanceForEntryBook=Total for entry book %s until %s -lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=Business N° lima-business.document.city=City @@ -47,9 +46,11 @@ lima-business.document.entrybook.lastPageColumnDescription=Total for selected en lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement lima-business.document.forMonthText=%s +lima-business.document.generalBalanceReport.title=GENERAL BALANCE lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook +lima-business.document.globalBalanceReport.title=GLOBALE BALANCE lima-business.document.grossamount=Gross Amount lima-business.document.headerCurrencyLabel=Currency\: lima-business.document.headerSelectedAccounts=%s to %s 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 49dd9cb..558a0db 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 @@ -14,7 +14,6 @@ lima-business.document.balance.globalClient=CENTRALISATION CLIENTS lima-business.document.balance.globalSupplier=CENTRALISATION FOURNISSEURS lima-business.document.balance.lastPageColumnDescription=Total général lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s -lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=N° Siret lima-business.document.city=Ville @@ -45,9 +44,11 @@ lima-business.document.entrybook.lastPageColumnDescription=Total pour les journa lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalBalanceReport.title=BALANCE GÉNÉRALE lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général +lima-business.document.globalBalanceReport.title=BALANCE GLOBALE lima-business.document.grossamount=Brut lima-business.document.headerCurrencyLabel=Devise\: lima-business.document.headerSelectedAccounts=%s à %s -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 0919fa58b571e38dedb5d0b604f2e5fa44e5dc1f Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:44:30 2015 +0200 refs #1241 Ajout de traductions --- lima-business/src/main/resources/i18n/lima-business_en_GB.properties | 2 ++ lima-business/src/main/resources/i18n/lima-business_fr_FR.properties | 2 ++ .../src/main/java/org/chorem/lima/server/HttpServerService.java | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) 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 2fd01cb..89e4c1a 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 @@ -46,10 +46,12 @@ lima-business.document.entrybook.lastPageColumnDescription=Total for selected en lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement lima-business.document.forMonthText=%s +lima-business.document.generalBalanceReport.choice=General balance lima-business.document.generalBalanceReport.title=GENERAL BALANCE lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook +lima-business.document.globalBalanceReport.choice=global balance lima-business.document.globalBalanceReport.title=GLOBALE BALANCE lima-business.document.grossamount=Gross Amount lima-business.document.headerCurrencyLabel=Currency\: 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 558a0db..64845a1 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 @@ -44,10 +44,12 @@ lima-business.document.entrybook.lastPageColumnDescription=Total pour les journa lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalBalanceReport.choice=Balance générale lima-business.document.generalBalanceReport.title=BALANCE GÉNÉRALE lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général +lima-business.document.globalBalanceReport.choice=Balance globale lima-business.document.globalBalanceReport.title=BALANCE GLOBALE lima-business.document.grossamount=Brut lima-business.document.headerCurrencyLabel=Devise\: diff --git a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java index eaa9a13..1022869 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java +++ b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java @@ -296,9 +296,9 @@ public class HttpServerService { + optionAccounts.toString() + "</select></div>" + "<div id='balanceType'>" - + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>Balance Générale\n" + + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>" + t("lima-business.document.generalBalanceReport.choice") + "\n" + " <br>\n" - + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">Balance Globale" + + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">" + t("lima-business.document.globalBalanceReport.choice") + "</div>" + "<input type=\"submit\">\n" + "</form></td>" -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 7f54c9e7f90cea3d576e8d2c44c05a69f89b7b0c Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 15:00:36 2015 +0200 refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe --- .../ejb/report/AccountReportServiceImpl.java | 98 +++++++++++----------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 94c74ff..14fced0 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -2,6 +2,7 @@ package org.chorem.lima.business.ejb.report; import net.sf.jasperreports.engine.JasperReport; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.chorem.lima.beans.AccountEntry; import org.chorem.lima.beans.AccountEntryImpl; import org.chorem.lima.beans.DocumentReport; @@ -48,61 +49,64 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc setHeaderColumnTitles(documentReport); - AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); - - if (from != null && to != null && account != null) { - String selectedAccounts = account.getAccountNumber(); - - Collection<AccountEntry> accountEntries = new ArrayList<>(); - - ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); - List<Entry> entries = results.getListEntry(); - - if (CollectionUtils.isNotEmpty(entries)) { - for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { - continue; + if (StringUtils.isNotBlank(accountId)) { + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + + if (from != null && to != null && account != null) { + String selectedAccounts = account.getAccountNumber(); + + Collection<AccountEntry> accountEntries = new ArrayList<>(); + + ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); + List<Entry> entries = results.getListEntry(); + + if (CollectionUtils.isNotEmpty(entries)) { + for (Entry entry : entries) { + if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { + continue; + } + + String entryAccountNumber = entry.getAccount().getAccountNumber(); + String code = ""; + if (entry.getFinancialTransaction().getEntryBook() != null) { + code = entry.getFinancialTransaction().getEntryBook().getCode(); + } + + AccountEntry accountEntry = new AccountEntryImpl(); + accountEntry.setAccountNumber(entryAccountNumber); + accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); + accountEntry.setCode(code); + accountEntry.setVoucher(entry.getVoucher()); + accountEntry.setDescription(entry.getDescription()); + accountEntry.setLettering(entry.getLettering()); + accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); + accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); + accountEntry.setFormatter(bigDecimalFormat); + accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); + accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); + accountEntries.add(accountEntry); } + } - String entryAccountNumber = entry.getAccount().getAccountNumber(); - String code = ""; - if (entry.getFinancialTransaction().getEntryBook() != null) { - code = entry.getFinancialTransaction().getEntryBook().getCode(); - } + documentReport.addAllAccounts(accountEntries); - AccountEntry accountEntry = new AccountEntryImpl(); - accountEntry.setAccountNumber(entryAccountNumber); - accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); - accountEntry.setCode(code); - accountEntry.setVoucher(entry.getVoucher()); - accountEntry.setDescription(entry.getDescription()); - accountEntry.setLettering(entry.getLettering()); - accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); - accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); - accountEntry.setFormatter(bigDecimalFormat); - accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); - accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); - accountEntries.add(accountEntry); + if (CollectionUtils.isEmpty(accountEntries)) { + selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); + } else if (accountEntries.size() == 1){ + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); + } else { + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); } - } - documentReport.addAllAccounts(accountEntries); + documentReport.setHeaderSelectedAccounts(selectedAccounts); - if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); - } else if (accountEntries.size() == 1){ - selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); - } else { - selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); + } else if (log.isWarnEnabled()) { + log.warn("No account present"); } - documentReport.setHeaderSelectedAccounts(selectedAccounts); - - } else { - if (log.isWarnEnabled()) { - log.warn("No account present"); - } + } else if (log.isWarnEnabled()) { + log.warn("No account present"); } return documentReport; -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 565568322a6302b26e45ada947e8e93aa5075513 Author: dcosse <cosse@codelutin.com> Date: Mon Nov 30 11:43:46 2015 +0100 correction suite au merge --- .../chorem/lima/ui/opening/OpeningViewHandler.java | 29 ++++++---------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java index 0b4a5be..7f87e4f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java @@ -31,13 +31,16 @@ import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.entity.FiscalPeriodImpl; import org.chorem.lima.enums.AccountsChartEnum; import org.chorem.lima.enums.EntryBooksChartEnum; +import org.chorem.lima.enums.FinancialStatementsChartEnum; import org.chorem.lima.enums.ImportExportEnum; +import org.chorem.lima.enums.VatStatementsChartEnum; import org.chorem.lima.ui.importexport.ImportExport; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; -import java.awt.*; +import java.awt.Color; import static org.nuiton.i18n.I18n.t; @@ -246,26 +249,8 @@ public class OpeningViewHandler { break; } //Import vatstatement - switch (defaultAccountsChartEnum) { - case SHORTENED: - - importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, - null, VatStatementsChartEnum.SHORTENED.getDefaultFileUrl(), false); - break; - case BASE: - importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, - null, VatStatementsChartEnum.BASE.getDefaultFileUrl(), false); - break; - case DEVELOPED: - importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, - null, VatStatementsChartEnum.DEVELOPED.getDefaultFileUrl(), false); - break; - default: - importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, - null, VatStatementsChartEnum.DEFAULT.getDefaultFileUrl(), false); - break; - } - + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.DEFAULT.getDefaultFileUrl(), false); } } } -- 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 develop in repository lima. See http://git.chorem.org/lima.git commit 3d5a3364505d0efad7a7180492a7a9e750d924c7 Merge: fd35125 5655683 Author: dcosse <cosse@codelutin.com> Date: Mon Nov 30 11:45:12 2015 +0100 Merge branch 'feature/1241-account-report' into develop .../chorem/lima/business/api/AccountService.java | 6 + .../chorem/lima/business/api/EntryBookService.java | 6 + .../chorem/lima/business/api/ImportService.java | 11 + .../chorem/lima/business/api/OptionsService.java | 3 + .../chorem/lima/business/api/TreasuryService.java | 13 + ...eportService.java => AccountReportService.java} | 14 +- .../business/api/report/BalanceReportService.java | 19 +- .../chorem/lima/business/LimaBusinessConfig.java | 22 +- .../lima/business/ejb/AccountServiceImpl.java | 7 + .../lima/business/ejb/EntryBookServiceImpl.java | 7 + .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../lima/business/ejb/OptionsServiceImpl.java | 6 + .../lima/business/ejb/TreasuryServiceImpl.java | 69 +++ .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../lima/business/ejb/csv/IdentityModel.java | 4 +- .../ejb/report/AccountReportServiceImpl.java | 125 ++++++ .../ejb/report/BalanceReportServiceImpl.java | 325 ++++++++++---- .../business/ejb/report/CommonsDocumentReport.java | 57 +++ .../report/GeneralEntryBookReportServiceImpl.java | 43 +- .../ejb/report/LedgerReportServiceImpl.java | 41 +- .../ProvisionalEntryBookReportServiceImpl.java | 64 +-- .../resources/i18n/lima-business_en_GB.properties | 56 +++ .../resources/i18n/lima-business_fr_FR.properties | 56 +++ .../org/chorem/lima/beans/BalanceAccountImpl.java | 23 +- .../V0_8_6_0__1241_create_table_TREASURY.sql | 54 +++ .../src/main/xmi/lima-callao-model.properties | 2 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57316 -> 61665 bytes lima-report/pom.xml | 10 +- .../chorem/lima/report/DocumentReportTypes.java | 1 + .../java/org/chorem/lima/report/DocumentsEnum.java | 4 +- .../org/chorem/lima/report/LimaReportConfig.java | 60 ++- .../lima/report/service/DocumentService.java | 321 ++++++-------- .../chorem/lima/report/service/JasperReports.java | 10 + .../AccountEntry.jrxml} | 170 ++++---- .../jasperreports/account/DocumentReport.jrxml | 266 ++++++++++++ .../balance/BalanceReportAccountReport.jrxml | 18 +- .../balance/BalanceSubAccountsReport.jrxml | 54 ++- .../jasperreports/balance/DocumentReport.jrxml | 387 ++++++++++------- .../jasperreports/entryBook/DocumentReport.jrxml | 394 ++++++++--------- .../jasperreports/entryBook/EntryBookReport.jrxml | 77 +--- .../entryBook/FinancialPeriodReport.jrxml | 191 ++------ .../entryBook/TransactionReport.jrxml | 222 +++------- .../generalEntryBook/DocumentReport.jrxml | 478 ++++++++++----------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 54 +-- .../GeneralEntryBookEntryReport.jrxml | 11 +- .../generalLedger/DocumentReport.jrxml | 406 +++++++++-------- .../generalLedger/GeneralLedgerEntryReport.jrxml | 204 +++------ .../generalLedger/GeneralLedgerReport.jrxml | 113 ++--- .../src/main/resources/reports/vat_form_fr.pdf | Bin 222623 -> 244238 bytes .../org/chorem/lima/report/action/ReportTest.java | 2 +- .../org/chorem/lima/server/HttpServerService.java | 41 +- .../main/java/org/chorem/lima/LimaSwingConfig.java | 1 + .../java/org/chorem/lima/ui/MainViewHandler.java | 13 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 161 +++++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 281 +++++++----- .../chorem/lima/ui/identity/IdentityHandler.java | 45 +- .../chorem/lima/ui/importexport/ImportExport.java | 8 + .../opening/{OpeningView.css => BackupPanel.css} | 29 -- .../org/chorem/lima/ui/opening/BackupPanel.jaxx | 39 ++ .../{OpeningView.css => BackupPanelHandler.java} | 42 +- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 10 +- .../lima/ui/opening/CreateIdentityPanel.jaxx | 64 ++- .../ui/opening/CreateIdentityPanelHandler.java | 1 - .../org/chorem/lima/ui/opening/OpeningView.css | 11 +- .../org/chorem/lima/ui/opening/OpeningView.jaxx | 28 +- .../chorem/lima/ui/opening/OpeningViewHandler.java | 164 +++++-- .../resources/i18n/lima-swing_en_GB.properties | 58 ++- .../resources/i18n/lima-swing_fr_FR.properties | 39 +- lima-swing/src/main/resources/icons/backup.png | Bin 0 -> 4803 bytes lima-swing/src/main/resources/import/vat_base.csv | 114 ++--- .../src/main/resources/import/vat_default.csv | 111 ++--- pom.xml | 8 +- 72 files changed, 3366 insertions(+), 2407 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm