[lima] branch feature/newReportBuilder created (now 5e5d8f2)
This is an automated email from the git hooks/post-receive script. New change to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git at 5e5d8f2 refs #769 création d'un nouveau module pour la partie web de lima et création du rapport balance avec jasper report This branch includes the following new commits: new ac28667 refs #769 merge de mes modification en cours new 5e5d8f2 refs #769 création d'un nouveau module pour la partie web de lima et création du rapport balance avec jasper report The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 5e5d8f200e878d145bb0a6d77743d2a3a8cfe50f Author: dcosse <japbiw74> Date: Thu Nov 6 15:50:18 2014 +0100 refs #769 création d'un nouveau module pour la partie web de lima et création du rapport balance avec jasper report commit ac286679afe87e43c4e1fe7dc521f472e54c4c30 Author: dcosse <japbiw74> Date: Fri Oct 31 12:27:53 2014 +0100 refs #769 merge de mes modification en cours -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit ac286679afe87e43c4e1fe7dc521f472e54c4c30 Author: dcosse <japbiw74> Date: Fri Oct 31 12:27:53 2014 +0100 refs #769 merge de mes modification en cours --- .../lima/business/LimaConfigurationHelper.java | 22 + .../chorem/lima/business/LimaServiceConfig.java | 4 +- .../lima/business/ejb/AbstractLimaService.java | 2 +- .../lima/business/ejb/DocumentServiceImpl.java | 2 +- .../org/chorem/lima/business/AbstractLimaTest.java | 476 +++++++++++++++ .../src/test/resources/reports/AccountReport.jrxml | 144 +++++ lima-callao/src/main/xmi/accounting-model.zargo | Bin 46061 -> 48221 bytes lima-swing/pom.xml | 24 + lima-swing/src/license/THIRD-PARTY.properties | 15 +- .../jasperreports/accounts/AccountReport.jrxml | 161 +++++ .../main/jasperreports/balance/BalanceReport.jrxml | 292 +++++++++ .../balance/BalanceReportAccountReport.jrxml | 126 ++++ .../balance/BalanceSubAccountsReport.jrxml | 107 ++++ .../org/chorem/lima/ui/report/ReportBuilder.java | 107 ++++ .../org/chorem/lima/ui/report/ReportFactory.java | 148 +++++ .../dataSource/AccountCustomDataSourceFabric.java | 137 +++++ .../dataSource/BalanceCustomDataSourceFabric.java | 147 +++++ .../src/main/resources/import/vat_shortened.csv | 2 +- .../java/org/chorem/lima/ui/AbstractLimaTest.java | 653 +++++++++++++++++++++ .../java/org/chorem/lima/ui/LimaTestsConfig.java | 71 +++ .../java/org/chorem/lima/ui/report/ReportTest.java | 56 ++ pom.xml | 7 + 22 files changed, 2696 insertions(+), 7 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaConfigurationHelper.java b/lima-business/src/main/java/org/chorem/lima/business/LimaConfigurationHelper.java index fdad4c8..00ee2b9 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaConfigurationHelper.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaConfigurationHelper.java @@ -22,6 +22,28 @@ package org.chorem.lima.business; * #L% */ +/* + * #%L + * Lima :: business + * %% + * 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 com.google.common.base.Function; import org.chorem.lima.entity.LimaCallaoTopiaApplicationContext; diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java index 4b2d5a6..032a5b4 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaServiceConfig.java @@ -115,7 +115,7 @@ public class LimaServiceConfig { return result; } - protected void setRootContextProperties(Properties rootContextProperties) { + public void setRootContextProperties(Properties rootContextProperties) { this.rootContextProperties = rootContextProperties; } @@ -133,7 +133,7 @@ public class LimaServiceConfig { return instance; } - protected void setConfig(ApplicationConfig config) { + public void setConfig(ApplicationConfig config) { this.config = config; } 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 a73a46b..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 @@ -44,7 +44,7 @@ public abstract class AbstractLimaService { * * @return dao helper */ - protected LimaCallaoTopiaDaoSupplier getDaoHelper() { + protected static LimaCallaoTopiaDaoSupplier getDaoHelper() { return LimaInterceptor.DAO_HELPER.get(); } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java index dff8c3f..d5ce60c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java @@ -790,7 +790,7 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document try { AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - Account accountFormat = accountTopiaDao.findByTopiaId(account); + Account accountFormat = accountTopiaDao.forTopiaIdEquals(account).findUniqueOrNull(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); accountReport = constructHtmlHeader(t("lima.reports.accounts")); diff --git a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java index afc7762..dab04ce 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java @@ -40,6 +40,7 @@ import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountImpl; +import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.EntryBookImpl; @@ -50,6 +51,7 @@ import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.entity.FiscalPeriodImpl; import org.chorem.lima.entity.LimaCallaoEntityEnum; import org.chorem.lima.entity.LimaCallaoTopiaApplicationContext; +import org.chorem.lima.entity.LimaCallaoTopiaPersistenceContext; import org.chorem.lima.service.LimaServiceFactory; import org.hibernate.cfg.Environment; import org.junit.After; @@ -251,6 +253,480 @@ public abstract class AbstractLimaTest { } /** + * Create a basic account plan. + * + * @throws org.chorem.lima.business.exceptions.LimaException + * @throws java.text.ParseException + */ + protected void initTestDefaultAccounts() throws Exception { + LimaCallaoTopiaPersistenceContext tcontext = context.newPersistenceContext(); + AccountTopiaDao accountTopiaDao = tcontext.getAccountDao(); + + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1", Account.PROPERTY_LABEL, "COMPTES DE CAPITAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2", Account.PROPERTY_LABEL, "COMPTES D'IMMOBILISATIONS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "3", Account.PROPERTY_LABEL, "COMPTES DE STOCKS ET D'EN-COURS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4", Account.PROPERTY_LABEL, "COMPTES DE TIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5", Account.PROPERTY_LABEL, "COMPTES FINANCIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6", Account.PROPERTY_LABEL, "COMPTES DE CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7", Account.PROPERTY_LABEL, "COMPTES DE PRODUITS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "8", Account.PROPERTY_LABEL, "COMPTES SPECIAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "10", Account.PROPERTY_LABEL, "REPORT A NOUVEAU (solde créditeur ou débiteur)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "11", Account.PROPERTY_LABEL, "RESULTAT NET DE L'EXERCICE (bénéfice ou perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "12", Account.PROPERTY_LABEL, "PROVISIONS REGLEMENTEES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "13", Account.PROPERTY_LABEL, "PROVlSlONS POUR RISQUES ET CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "14", Account.PROPERTY_LABEL, "EMPRUNTS ET DETTES ASSIMILEES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "15", Account.PROPERTY_LABEL, "IMMOBlLlSATIONS CORPORELLES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "16", Account.PROPERTY_LABEL, "IMMOBILlSATlONS EN COURS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "17", Account.PROPERTY_LABEL, "AUTRES IMMOBILISATIONS FINANCIERES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "20", Account.PROPERTY_LABEL, "MATIERES PREMIERES (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "21", Account.PROPERTY_LABEL, "AUTRES APPROVISIONNEMENTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "23", Account.PROPERTY_LABEL, "EN-COURS DE PRODUCTION DE BIENS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "26", Account.PROPERTY_LABEL, "EN-COURS DE PRODUCTION DE SERVICES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27", Account.PROPERTY_LABEL, "STOCKS DE PRODUITS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "28", Account.PROPERTY_LABEL, "STOCKS DE MARCHANDISES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "29", Account.PROPERTY_LABEL, "SECURITE SOCIALE ET AUTRES ORGANISMES SOCIAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "31", Account.PROPERTY_LABEL, "DEBITEURS ET CREDITEURS DIVERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "32", Account.PROPERTY_LABEL, "COMPTES TRANSITOIRES OU D'ATTENTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "33", Account.PROPERTY_LABEL, "VALEURS MOBILIERES DE PLACEMENT"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "34", Account.PROPERTY_LABEL, "BANQUES; ETABLISSEMENTS FINANCIERS ET ASSIMILES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "35", Account.PROPERTY_LABEL, "CAISSE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "37", Account.PROPERTY_LABEL, "REGIES D'AVANCES ET ACCREDITIFS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "39", Account.PROPERTY_LABEL, "VIREMENTS INTERNES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "40", Account.PROPERTY_LABEL, "ACHATS (sauf 603)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "41", Account.PROPERTY_LABEL, "Services extérieurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "42", Account.PROPERTY_LABEL, "Autres services extérieurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "43", Account.PROPERTY_LABEL, "IMPOTS; TAXES ET VERSEMENTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44", Account.PROPERTY_LABEL, "AUTRES CHARGES DE GESTION COURANTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "45", Account.PROPERTY_LABEL, "CHARGES FINANCIERES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "46", Account.PROPERTY_LABEL, "CHARGES EXCEPTIONNELLES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "47", Account.PROPERTY_LABEL, "PRODUCTION IMMOBILISEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "48", Account.PROPERTY_LABEL, "SUBVENTlONS D'EXPLOITATION"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "49", Account.PROPERTY_LABEL, "AUTRES PRODUITS DE GESTION COURANTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "50", Account.PROPERTY_LABEL, "PRODUITS FINANCIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "51", Account.PROPERTY_LABEL, "PRODUITS EXCEPTIONNELS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "52", Account.PROPERTY_LABEL, "REPRISES SUR AMORTISSEMENTS ET PROVISIONS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "53", Account.PROPERTY_LABEL, "TRANSFERTS DE CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "54", Account.PROPERTY_LABEL, "ENGAGEMENTS HORS BILAN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "58", Account.PROPERTY_LABEL, "RESULTAT EN INSTANCE D'AFFECTATION"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "59", Account.PROPERTY_LABEL, "BILAN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "60", Account.PROPERTY_LABEL, "Capital"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "61", Account.PROPERTY_LABEL, "Ecarts de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "62", Account.PROPERTY_LABEL, "Compte de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "63", Account.PROPERTY_LABEL, "Résultat de l'exercice (bénéfice)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "64", Account.PROPERTY_LABEL, "Résultat de l'exercice (perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "65", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "66", Account.PROPERTY_LABEL, "Provision spéciale de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "67", Account.PROPERTY_LABEL, "Plus-values réinvesties"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68", Account.PROPERTY_LABEL, "Autres provisions réglementées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "69", Account.PROPERTY_LABEL, "Provisions pour risques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "70", Account.PROPERTY_LABEL, "Autres emprunts obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "71", Account.PROPERTY_LABEL, "Emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "72", Account.PROPERTY_LABEL, "Primes de remboursement des obligations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "74", Account.PROPERTY_LABEL, "Dettes rattachées a des participations (groupe)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "75", Account.PROPERTY_LABEL, "Frais détablissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "76", Account.PROPERTY_LABEL, "Frais de recherche et de développement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "77", Account.PROPERTY_LABEL, "Concessions et droits similaires; brevets; licences; marques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78", Account.PROPERTY_LABEL, "Droit au bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "79", Account.PROPERTY_LABEL, "Fonds commercial"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "80", Account.PROPERTY_LABEL, "Autres immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "88", Account.PROPERTY_LABEL, "Dépôts et cautionnements versés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "89", Account.PROPERTY_LABEL, "Amortissements des immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "101", Account.PROPERTY_LABEL, "Amortissements des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "104", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "105", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "106", Account.PROPERTY_LABEL, "Provisions pour dépréciation des participations et créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "107", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres immobilisations fina"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "108", Account.PROPERTY_LABEL, "Provisions pour dépréciation des matières premières (et four"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "109", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres approvisionnements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "110", Account.PROPERTY_LABEL, "Provisions pour dépréciation des encours de production de bi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "119", Account.PROPERTY_LABEL, "Provisions pour dépréciation des en-cours de production de s"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "120", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "129", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "131", Account.PROPERTY_LABEL, "Personnel - Rémunérations dues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "138", Account.PROPERTY_LABEL, "Personnel - Charges à payer et produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "139", Account.PROPERTY_LABEL, "Sécurité sociale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "142", Account.PROPERTY_LABEL, "Autres organismes sociaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "143", Account.PROPERTY_LABEL, "Etat - Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "144", Account.PROPERTY_LABEL, "Etat - Taxes sur le chiffre d'affaires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "145", Account.PROPERTY_LABEL, "Obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "146", Account.PROPERTY_LABEL, "Autres impôts; taxes et versements assimilés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "147", Account.PROPERTY_LABEL, "Associés - Comptes courants"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "148", Account.PROPERTY_LABEL, "Créances sur cessions d'immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "151", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "153", Account.PROPERTY_LABEL, "Charges à repartir sur plusieurs exercices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "154", Account.PROPERTY_LABEL, "Charges constatées d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "155", Account.PROPERTY_LABEL, "Produits constatés d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "156", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de clients"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "157", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de débiteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "158", Account.PROPERTY_LABEL, "Valeurs à I'encaissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "161", Account.PROPERTY_LABEL, "Banques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "163", Account.PROPERTY_LABEL, "Autres organismes financiers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "164", Account.PROPERTY_LABEL, "Concours bancaires courant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "165", Account.PROPERTY_LABEL, "Caisse siège social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "166", Account.PROPERTY_LABEL, "Virements internes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "167", Account.PROPERTY_LABEL, "Provisions pour dépréciation des valeurs mobilières de place"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "168", Account.PROPERTY_LABEL, "Achats stockés - Matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "169", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (approvisionnements et marchandises)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "171", Account.PROPERTY_LABEL, "Achat de materiel; equipement et travaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "174", Account.PROPERTY_LABEL, "Achats non stockes de matières et fournitures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "178", Account.PROPERTY_LABEL, "Achats de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "201", Account.PROPERTY_LABEL, "Frais accessoires d'achat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "203", Account.PROPERTY_LABEL, "Rabais; remises et ristournes obtenus sur achats"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "205", Account.PROPERTY_LABEL, "Sous-traitance générale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "206", Account.PROPERTY_LABEL, "Redevances de crédit-bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "207", Account.PROPERTY_LABEL, "Locations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "208", Account.PROPERTY_LABEL, "Charges locatives et de copropriété"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "211", Account.PROPERTY_LABEL, "Entretien et réparations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "212", Account.PROPERTY_LABEL, "Primes d'assurance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "213", Account.PROPERTY_LABEL, "Personnel extérieur à l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "214", Account.PROPERTY_LABEL, "Rémunérations intermédiaires et honoraires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "215", Account.PROPERTY_LABEL, "Publicité; publications; relations publiques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "218", Account.PROPERTY_LABEL, "Transports de biens et transports collectifs du personnel"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "231", Account.PROPERTY_LABEL, "Déplacements; missions et réceptions"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "232", Account.PROPERTY_LABEL, "Frais postaux et frais de télécommunications"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "237", Account.PROPERTY_LABEL, "Services bancaires et assimiles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "238", Account.PROPERTY_LABEL, "Impôts; taxes et versements assimiles sur rémunérations (aut"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "261", Account.PROPERTY_LABEL, "Autres impôts taxes et versements assimiles (administration"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "266", Account.PROPERTY_LABEL, "Rémunération du travail de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "267", Account.PROPERTY_LABEL, "Charges de sécurité sociale et de prévoyance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "268", Account.PROPERTY_LABEL, "Redevances pour concessions; brevets; licences; marques; pro"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "269", Account.PROPERTY_LABEL, "Pertes sur créances irrécouvrables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "271", Account.PROPERTY_LABEL, "Quote-part de résultat sur opérations faites en commun"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "272", Account.PROPERTY_LABEL, "Escomptes accordés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "273", Account.PROPERTY_LABEL, "Valeurs comptables des éléments d'actif cédés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "274", Account.PROPERTY_LABEL, "Dotations aux amort. - Charges d'exploitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "275", Account.PROPERTY_LABEL, "Dotations aux amortissements et aux provisions - Charges fin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "276", Account.PROPERTY_LABEL, "Dotations aux amortissements et aux provisions - Charges exc"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "279", Account.PROPERTY_LABEL, "Participation des salaries aux fruits de l'expansion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "280", Account.PROPERTY_LABEL, "Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "281", Account.PROPERTY_LABEL, "Imposition forfaitaire annuelle des sociétés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "290", Account.PROPERTY_LABEL, "Produits - Reports en arrière des déficits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "291", Account.PROPERTY_LABEL, "Ventes de produits finis"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "293", Account.PROPERTY_LABEL, "Prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "296", Account.PROPERTY_LABEL, "Ventes de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "297", Account.PROPERTY_LABEL, "Produits des activités annexes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "311", Account.PROPERTY_LABEL, "Rabais; remises et ristournes accordées par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "312", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (en-cours de production; produits)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "317", Account.PROPERTY_LABEL, "Immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "321", Account.PROPERTY_LABEL, "Produits divers de gestion courante"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "322", Account.PROPERTY_LABEL, "Escomptes obtenus"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "326", Account.PROPERTY_LABEL, "Produits des cessions éléments d'actif"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "331", Account.PROPERTY_LABEL, "Reprises sur amortissements et provisions (à inscrire dans l"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "335", Account.PROPERTY_LABEL, "Reprises sur provisions a inscrire dans les produits financi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "341", Account.PROPERTY_LABEL, "Reprises sur provisions (à inscrire dans les produits except"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "345", Account.PROPERTY_LABEL, "Transfert de charges d'exploitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "351", Account.PROPERTY_LABEL, "Engagements donnés par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "355", Account.PROPERTY_LABEL, "Engagements reçus par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "358", Account.PROPERTY_LABEL, "Contrepartie des engagements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "371", Account.PROPERTY_LABEL, "Réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "372", Account.PROPERTY_LABEL, "Réserves indisponibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "391", Account.PROPERTY_LABEL, "Réserves statutaires ou contractuelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "392", Account.PROPERTY_LABEL, "Réserves réglementes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "393", Account.PROPERTY_LABEL, "Autres réserves"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "394", Account.PROPERTY_LABEL, "Provisions pour charges sociales et fiscales sur congés à pa"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "395", Account.PROPERTY_LABEL, "Matériel industriel (1)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "397", Account.PROPERTY_LABEL, "Matériel de transport"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "400", Account.PROPERTY_LABEL, "Matériel de bureau et matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "401", Account.PROPERTY_LABEL, "Frais établissement (même ventilation que celle du compte 20"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "403", Account.PROPERTY_LABEL, "Constructions même ventilation que celle du compte 213)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "404", Account.PROPERTY_LABEL, "Installations techniques; matériel et outillage industriels"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "405", Account.PROPERTY_LABEL, "Dettes provisionnées pour congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "408", Account.PROPERTY_LABEL, "Autres charges à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "409", Account.PROPERTY_LABEL, "Obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "410", Account.PROPERTY_LABEL, "tva cee"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "411", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires déductibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "413", Account.PROPERTY_LABEL, "Produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "416", Account.PROPERTY_LABEL, "Reglement par chèques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "417", Account.PROPERTY_LABEL, "Réglement par CB"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "418", Account.PROPERTY_LABEL, "Réglement par LCR"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "419", Account.PROPERTY_LABEL, "Réglement en especes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "421", Account.PROPERTY_LABEL, "Intérêts courus à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "422", Account.PROPERTY_LABEL, "Crédit de mobilisation de créances commerciales (CMCC)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "424", Account.PROPERTY_LABEL, "Mobilisation de créances nées à létranger"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "425", Account.PROPERTY_LABEL, "Fournitures consommables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "426", Account.PROPERTY_LABEL, "Variation des stocks de matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "427", Account.PROPERTY_LABEL, "Variation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "428", Account.PROPERTY_LABEL, "Achat marchandise CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "431", Account.PROPERTY_LABEL, "Achats en francise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "437", Account.PROPERTY_LABEL, "Malis sur emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "438", Account.PROPERTY_LABEL, "Honoraires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "441", Account.PROPERTY_LABEL, "Commissions et frais sur émission d'emprunts"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "442", Account.PROPERTY_LABEL, "Frais sur effets (commissions d'endos...)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "443", Account.PROPERTY_LABEL, "Participation des employeurs à l'effort de construction"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "444", Account.PROPERTY_LABEL, "Contribution sociale de solidarité à la charge des sociétés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445", Account.PROPERTY_LABEL, "Congés payes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "446", Account.PROPERTY_LABEL, "Indemnités et avantages divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "447", Account.PROPERTY_LABEL, "Cotisations à l'URSSAF"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "451", Account.PROPERTY_LABEL, "Cotisations aux caisses de retraites"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "455", Account.PROPERTY_LABEL, "Cotisations aux ASSEDIC"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "456", Account.PROPERTY_LABEL, "Intérêts des emprunts et dettes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "457", Account.PROPERTY_LABEL, "Intérêts des comptes courants et des dépôts créditeurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "458", Account.PROPERTY_LABEL, "Intérêts bancaires et sur opérations de financement (escompt"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "462", Account.PROPERTY_LABEL, "Intérêts des obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "464", Account.PROPERTY_LABEL, "Pertes de change ou de conversion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "465", Account.PROPERTY_LABEL, "Dotations aux amortissements sur immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "467", Account.PROPERTY_LABEL, "Dotations aux amortissements des charges d'exploitation à ré"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "468", Account.PROPERTY_LABEL, "Dotations aux provisions pour risques et charges d'exploitat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "470", Account.PROPERTY_LABEL, "Dotations aux amortissements des primes de remboursement des"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "476", Account.PROPERTY_LABEL, "Dotation aux provisions pour dépréciation des éléments finan"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "477", Account.PROPERTY_LABEL, "Dotations aux amortissements exceptionnels sur immobilisatio"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "478", Account.PROPERTY_LABEL, "Ports et frais accessoires factures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "481", Account.PROPERTY_LABEL, "Bonis sur reprises d'emballages consignes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "486", Account.PROPERTY_LABEL, "Autres produits activités annexes (cessions d'approvisionnem"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "487", Account.PROPERTY_LABEL, "Variation des en-cours de production de biens"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "488", Account.PROPERTY_LABEL, "Variation des en-cours de production de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "491", Account.PROPERTY_LABEL, "Variation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "495", Account.PROPERTY_LABEL, "Gains de change ou de conversion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "496", Account.PROPERTY_LABEL, "Reprises sur provisions pour dépréciation des éléments finan"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "501", Account.PROPERTY_LABEL, "Sur emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "502", Account.PROPERTY_LABEL, "TVA à décaisser"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "503", Account.PROPERTY_LABEL, "TVA sur immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "504", Account.PROPERTY_LABEL, "TVA sur autres bien et services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "505", Account.PROPERTY_LABEL, "Crédit de TVA à reporter"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "506", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "507", Account.PROPERTY_LABEL, "TVA collectée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "508", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "509", Account.PROPERTY_LABEL, "Remboursement de taxes sur le chiffre d'affaires demandé"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "511", Account.PROPERTY_LABEL, "TVA récupérée d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "512", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures non parvenues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "514", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures à établir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "515", Account.PROPERTY_LABEL, "Achats stockés - Matières premières France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "516", Account.PROPERTY_LABEL, "Achats stockés - Matières premières CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "517", Account.PROPERTY_LABEL, "Frais accessoires d'achat France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "518", Account.PROPERTY_LABEL, "Frais accessoires d'achat CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "519", Account.PROPERTY_LABEL, "Dotations aux amort. immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "530", Account.PROPERTY_LABEL, "Dotations provisions dépréc. immos incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "540", Account.PROPERTY_LABEL, "Dotations provisions dépréc. immos corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "580", Account.PROPERTY_LABEL, "Stocks et en-cours"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "590", Account.PROPERTY_LABEL, "Créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "601", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "602", Account.PROPERTY_LABEL, "Ventes de produits finis France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "603", Account.PROPERTY_LABEL, "Ventes de produits finis CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "604", Account.PROPERTY_LABEL, "Prestations de services France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "605", Account.PROPERTY_LABEL, "Prestations de services CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "606", Account.PROPERTY_LABEL, "Ventes de marchandises France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "607", Account.PROPERTY_LABEL, "Ventes de marchandises CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "608", Account.PROPERTY_LABEL, "Compte créé pendant import"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "609", Account.PROPERTY_LABEL, "Reprises prov. dépréc. immos incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "611", Account.PROPERTY_LABEL, "Reprises prov. dépréc. immos corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "612", Account.PROPERTY_LABEL, "Stocks et en-cours"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "613", Account.PROPERTY_LABEL, "Créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "614", Account.PROPERTY_LABEL, "Reprises sur provisions - Amort. dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "615", Account.PROPERTY_LABEL, "achat cee"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "616", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "617", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "618", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "619", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "621", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "622", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "623", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "624", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "625", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "626", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "627", Account.PROPERTY_LABEL, "TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "628", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "629", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "631", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "633", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "635", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "637", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "641", Account.PROPERTY_LABEL, "Capital"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "644", Account.PROPERTY_LABEL, "Capital non amorti"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "645", Account.PROPERTY_LABEL, "Ecarts de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "646", Account.PROPERTY_LABEL, "Réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "647", Account.PROPERTY_LABEL, "réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "648", Account.PROPERTY_LABEL, "Réserves indisponibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "651", Account.PROPERTY_LABEL, "Réserves statutaires ou contractuelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "653", Account.PROPERTY_LABEL, "Réserves réglementes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "654", Account.PROPERTY_LABEL, "Autres réserves"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "655", Account.PROPERTY_LABEL, "Compte de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "658", Account.PROPERTY_LABEL, "report a nouveau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "661", Account.PROPERTY_LABEL, "Résultat de l'exercice (bénéfice)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "664", Account.PROPERTY_LABEL, "Résultat de l'exercice (perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "665", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "667", Account.PROPERTY_LABEL, "Provision spéciale de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "668", Account.PROPERTY_LABEL, "Plus-values réinvesties"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "671", Account.PROPERTY_LABEL, "Autres provisions réglementées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "672", Account.PROPERTY_LABEL, "Provisions pour risques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "675", Account.PROPERTY_LABEL, "Provision pour litige"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "678", Account.PROPERTY_LABEL, "Provisions pour charges sociales et fiscales sur congés à pa"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "681", Account.PROPERTY_LABEL, "Autres emprunts obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "686", Account.PROPERTY_LABEL, "Emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "687", Account.PROPERTY_LABEL, "Sur emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "691", Account.PROPERTY_LABEL, "Primes de remboursement des obligations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "695", Account.PROPERTY_LABEL, "Dettes rattachées a des participations (groupe)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "696", Account.PROPERTY_LABEL, "Frais détablissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "697", Account.PROPERTY_LABEL, "Frais de recherche et de développement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "698", Account.PROPERTY_LABEL, "Concessions et droits similaires; brevets; licences; marques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "699", Account.PROPERTY_LABEL, "Droit au bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "701", Account.PROPERTY_LABEL, "Fonds commercial"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "702", Account.PROPERTY_LABEL, "Autres immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "703", Account.PROPERTY_LABEL, "Matériel industriel (1)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "704", Account.PROPERTY_LABEL, "Matériel de transport"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "705", Account.PROPERTY_LABEL, "Matériel de bureau et matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "706", Account.PROPERTY_LABEL, "MATERIEL INFORMATIQUE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "707", Account.PROPERTY_LABEL, "Autres titres"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "708", Account.PROPERTY_LABEL, "PRET AUX SALARIES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "709", Account.PROPERTY_LABEL, "Dépôts et cautionnements versés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "713", Account.PROPERTY_LABEL, "Créances sur Titres Immo."); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "721", Account.PROPERTY_LABEL, "Amortissements des immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "722", Account.PROPERTY_LABEL, "Frais établissement (même ventilation que celle du compte 20"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "740", Account.PROPERTY_LABEL, "Amortissements des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "751", Account.PROPERTY_LABEL, "Constructions même ventilation que celle du compte 213)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "752", Account.PROPERTY_LABEL, "Installations techniques; matériel et outillage industriels"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "753", Account.PROPERTY_LABEL, "AMORTISSEMENT MATERIEL"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "754", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "755", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "758", Account.PROPERTY_LABEL, "Provisions pour dépréciation des participations et créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "761", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres immobilisations fina"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "762", Account.PROPERTY_LABEL, "Provisions pour dépréciation des matières premières (et four"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "763", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres approvisionnements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "764", Account.PROPERTY_LABEL, "Provisions pour dépréciation des encours de production de bi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "765", Account.PROPERTY_LABEL, "Provisions pour dépréciation des en-cours de production de s"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "766", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "767", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "768", Account.PROPERTY_LABEL, "Fournisseurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "771", Account.PROPERTY_LABEL, "NF Poussin Benjamin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "772", Account.PROPERTY_LABEL, "NF Thimel Arnaud"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "775", Account.PROPERTY_LABEL, "NF Ruchaud Julien"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "777", Account.PROPERTY_LABEL, "Mutuelle du Mans"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "778", Account.PROPERTY_LABEL, "SFR"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "781", Account.PROPERTY_LABEL, "Free Telecom"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "786", Account.PROPERTY_LABEL, "April"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "787", Account.PROPERTY_LABEL, "CM-CIC Epargne Salariale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "791", Account.PROPERTY_LABEL, "ECAC -Troadec"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "796", Account.PROPERTY_LABEL, "Fournisseurs facture à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "801", Account.PROPERTY_LABEL, "Facture à Emettre"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "802", Account.PROPERTY_LABEL, "Personnel - Rémunérations dues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "809", Account.PROPERTY_LABEL, "Regul Mutuelle à recupérer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "890", Account.PROPERTY_LABEL, "Personnel - Charges à payer et produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "891", Account.PROPERTY_LABEL, "Dettes provisionnées pour congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1061", Account.PROPERTY_LABEL, "Intéressement à verser aux salariés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1062", Account.PROPERTY_LABEL, "Personnel -autres charges a payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1063", Account.PROPERTY_LABEL, "Urssaf"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1064", Account.PROPERTY_LABEL, "Urssaf-csg-crds-forfait social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1068", Account.PROPERTY_LABEL, "retraite"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1391", Account.PROPERTY_LABEL, "Pôle Emploi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1398", Account.PROPERTY_LABEL, "Retraite ARRCO"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1671", Account.PROPERTY_LABEL, "Retraite Cadre AGIRC"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1674", Account.PROPERTY_LABEL, "Mutuelle"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1675", Account.PROPERTY_LABEL, "Prévoyance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2761", Account.PROPERTY_LABEL, "charges sociales sur congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2768", Account.PROPERTY_LABEL, "Autres charges à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2801", Account.PROPERTY_LABEL, "URSSAF à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2803", Account.PROPERTY_LABEL, "Subventions d'expoitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2805", Account.PROPERTY_LABEL, "Etat - Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2807", Account.PROPERTY_LABEL, "Crédit Impot Recherche à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2808", Account.PROPERTY_LABEL, "IS à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2811", Account.PROPERTY_LABEL, "Crédit Impot Recherche à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2812", Account.PROPERTY_LABEL, "Crédit Impot Intéressement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2813", Account.PROPERTY_LABEL, "Etat - Taxes sur le chiffre d'affaires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2814", Account.PROPERTY_LABEL, "TVA à décaisser"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2815", Account.PROPERTY_LABEL, "TVA à décaisser 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2818", Account.PROPERTY_LABEL, "TVA sur immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2905", Account.PROPERTY_LABEL, "TVA sur immobilisations 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2906", Account.PROPERTY_LABEL, "TVA sur autres bien et services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2907", Account.PROPERTY_LABEL, "TVA/ABS 2;1%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2908", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2911", Account.PROPERTY_LABEL, "TVA sur autres biens et services 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2931", Account.PROPERTY_LABEL, "Crédit de TVA à reporter"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2932", Account.PROPERTY_LABEL, "Crédit de TVA à reporter 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2961", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2966", Account.PROPERTY_LABEL, "TVA collectée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2967", Account.PROPERTY_LABEL, "TVA Collectée 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2968", Account.PROPERTY_LABEL, "TVA encaissée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2971", Account.PROPERTY_LABEL, "TVA encaissée 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2972", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2973", Account.PROPERTY_LABEL, "TVA A REGUL"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2974", Account.PROPERTY_LABEL, "Remboursement de taxes sur le chiffre d'affaires demandé"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2975", Account.PROPERTY_LABEL, "TVA récupérée d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2976", Account.PROPERTY_LABEL, "Taxes sur le chif d'af sur factures non parvenues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4081", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures à établir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4084", Account.PROPERTY_LABEL, "Obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4088", Account.PROPERTY_LABEL, "Autres TVA à déduire"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4091", Account.PROPERTY_LABEL, "Autres impôts; taxes et versements assimilés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4096", Account.PROPERTY_LABEL, "ETAT CHARGES A PAYER"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4097", Account.PROPERTY_LABEL, "Etat charges a payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4098", Account.PROPERTY_LABEL, "TAXE PRO"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4191", Account.PROPERTY_LABEL, "Etat charges à payer formation prof"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4196", Account.PROPERTY_LABEL, "Impôt dégrevements à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4197", Account.PROPERTY_LABEL, "Associés - Comptes courants"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4198", Account.PROPERTY_LABEL, "compte REGNIER"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4282", Account.PROPERTY_LABEL, "compte POUSSIN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4284", Account.PROPERTY_LABEL, "compte PINEAU"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4286", Account.PROPERTY_LABEL, "Créances sur cessions d'immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4287", Account.PROPERTY_LABEL, "Subvention Oseo à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4452", Account.PROPERTY_LABEL, "Débiteurs et crediteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4455", Account.PROPERTY_LABEL, "Produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4456", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4457", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4458", Account.PROPERTY_LABEL, "Charges à repartir sur plusieurs exercices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4686", Account.PROPERTY_LABEL, "Charges constatées d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4687", Account.PROPERTY_LABEL, "Produits constatés d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5111", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de clients"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5112", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de débiteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5113", Account.PROPERTY_LABEL, "VMP - Actions"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5114", Account.PROPERTY_LABEL, "CAT Tonic 60"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5121", Account.PROPERTY_LABEL, "Valeurs à I'encaissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5122", Account.PROPERTY_LABEL, "Banques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6022", Account.PROPERTY_LABEL, "CAT TONIC 60"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6026", Account.PROPERTY_LABEL, "Autres organismes financiers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6031", Account.PROPERTY_LABEL, "Intérêts courus à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6032", Account.PROPERTY_LABEL, "Concours bancaires courant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6091", Account.PROPERTY_LABEL, "Crédit de mobilisation de créances commerciales (CMCC)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6092", Account.PROPERTY_LABEL, "Mobilisation de créances nées à létranger"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6094", Account.PROPERTY_LABEL, "TONIC 60- Intérets courus à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6095", Account.PROPERTY_LABEL, "Caisse siège social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6096", Account.PROPERTY_LABEL, "Virements internes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6097", Account.PROPERTY_LABEL, "Provisions pour dépréciation des valeurs mobilières de place"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6098", Account.PROPERTY_LABEL, "Achats stockés - Matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6371", Account.PROPERTY_LABEL, "ACHATS MATERIELS INFORMATIQUES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6411", Account.PROPERTY_LABEL, "Achats stockés - Matières premières France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6412", Account.PROPERTY_LABEL, "Achats stockés - Matières premières CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6413", Account.PROPERTY_LABEL, "Fournitures consommables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6414", Account.PROPERTY_LABEL, "achat carburant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6451", Account.PROPERTY_LABEL, "Fourniture de magasin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6452", Account.PROPERTY_LABEL, "Fourniture de bureau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6453", Account.PROPERTY_LABEL, "Frais postaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6454", Account.PROPERTY_LABEL, "Emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6688", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (approvisionnements et marchandises)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7133", Account.PROPERTY_LABEL, "Variation des stocks de matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7134", Account.PROPERTY_LABEL, "Variation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7135", Account.PROPERTY_LABEL, "Prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7688", Account.PROPERTY_LABEL, "achat matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27682", Account.PROPERTY_LABEL, "Achats non stockes de matières et fournitures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27684", Account.PROPERTY_LABEL, "éléctricité"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27685", Account.PROPERTY_LABEL, "gaz"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27688", Account.PROPERTY_LABEL, "Repas"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44551", Account.PROPERTY_LABEL, "Petit équipement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44562", Account.PROPERTY_LABEL, "frais d'aménagement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44566", Account.PROPERTY_LABEL, "Fournitures de bureau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44567", Account.PROPERTY_LABEL, "CARBURANTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44571", Account.PROPERTY_LABEL, "Achats de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44583", Account.PROPERTY_LABEL, "achats divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44584", Account.PROPERTY_LABEL, "Achats de marchandises France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44586", Account.PROPERTY_LABEL, "Achats de marchandises CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44587", Account.PROPERTY_LABEL, "Frais accessoires d'achat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68111", Account.PROPERTY_LABEL, "Frais accessoires d'achat France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68112", Account.PROPERTY_LABEL, "Frais accessoires d'achat CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68161", Account.PROPERTY_LABEL, "Rabais; remises et ristournes obtenus sur achats"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68162", Account.PROPERTY_LABEL, "RRR sur prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68725", Account.PROPERTY_LABEL, "Sous-traitance générale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78161", Account.PROPERTY_LABEL, "Redevances de crédit-bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78162", Account.PROPERTY_LABEL, "Locations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78725", Account.PROPERTY_LABEL, "loyer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445661", Account.PROPERTY_LABEL, "Location informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445662", Account.PROPERTY_LABEL, "location mobilière"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445664", Account.PROPERTY_LABEL, "Malis sur emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445665", Account.PROPERTY_LABEL, "Charges locatives et de copropriété"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445711", Account.PROPERTY_LABEL, "Entretien et réparations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445712", Account.PROPERTY_LABEL, "Entretien et réparations sur biens immo"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445714", Account.PROPERTY_LABEL, "entretien locaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445715", Account.PROPERTY_LABEL, "Primes d'assurance"); + tcontext.commit(); + } + + /** * Create some EntryBooks. * * @throws org.chorem.lima.business.exceptions.LimaException diff --git a/lima-business/src/test/resources/reports/AccountReport.jrxml b/lima-business/src/test/resources/reports/AccountReport.jrxml new file mode 100644 index 0000000..e043ea8 --- /dev/null +++ b/lima-business/src/test/resources/reports/AccountReport.jrxml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> +<!-- 2014-10-01T18:53:21 --> +<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="AccountReport" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="4eedbb89-b4f6-4469-9ab6-f642a1688cf7"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="AccountJBadaptor"/> + <style name="Title" forecolor="#FFFFFF" fontName="Times New Roman" fontSize="50" isBold="false" pdfFontName="Times-Bold"/> + <style name="SubTitle" forecolor="#CCCCCC" fontName="Times New Roman" fontSize="18" isBold="false" pdfFontName="Times-Roman"/> + <style name="Column header" forecolor="#666666" fontName="Times New Roman" fontSize="14" isBold="true" pdfFontName="Times-Roman"/> + <style name="Detail" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"/> + <style name="Row" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"> + <conditionalStyle> + <conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression> + <style mode="Opaque" backcolor="#EEEFF0"/> + </conditionalStyle> + </style> + <style name="Table"> + <box> + <pen lineWidth="1.0" lineColor="#000000"/> + <topPen lineWidth="1.0" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineColor="#000000"/> + <bottomPen lineWidth="1.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineColor="#000000"/> + </box> + </style> + <style name="Table_TH" mode="Opaque" backcolor="#FFFFFF"> + <box> + <pen lineWidth="0.5" lineColor="#000000"/> + <topPen lineWidth="0.5" lineColor="#000000"/> + <leftPen lineWidth="0.5" lineColor="#000000"/> + <bottomPen lineWidth="0.5" lineColor="#000000"/> + <rightPen lineWidth="0.5" lineColor="#000000"/> + </box> + </style> + <style name="Table_CH" mode="Opaque" backcolor="#CACED0"> + <box> + <pen lineWidth="0.5" lineColor="#000000"/> + <topPen lineWidth="0.5" lineColor="#000000"/> + <leftPen lineWidth="0.5" lineColor="#000000"/> + <bottomPen lineWidth="0.5" lineColor="#000000"/> + <rightPen lineWidth="0.5" lineColor="#000000"/> + </box> + </style> + <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"> + <box> + <pen lineWidth="0.5" lineColor="#000000"/> + <topPen lineWidth="0.5" lineColor="#000000"/> + <leftPen lineWidth="0.5" lineColor="#000000"/> + <bottomPen lineWidth="0.5" lineColor="#000000"/> + <rightPen lineWidth="0.5" lineColor="#000000"/> + </box> + <conditionalStyle> + <conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression> + <style backcolor="#D8D8D8"/> + </conditionalStyle> + </style> + <subDataset name="tableDataset" uuid="f13e6d36-5148-4ecc-bbe3-3035def80980"> + <queryString> + <![CDATA[]]> + </queryString> + </subDataset> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <group name="Gruppo1"> + <groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression> + <groupHeader> + <band height="33"> + <textField> + <reportElement x="10" y="3" width="100" height="30" uuid="361f7275-fa59-4593-991e-c38742591301"/> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="440" y="1" width="100" height="30" uuid="fa269b8f-01f7-4a22-ae3f-e61b2065bfc6"/> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + </band> + </groupHeader> + <groupFooter> + <band> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </band> + </groupFooter> + </group> + <title> + <band height="86" splitType="Stretch"> + <line> + <reportElement x="0" y="80" width="556" height="1" uuid="806ce5df-1219-4876-ae0c-ca7405b1f246"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + </line> + <staticText> + <reportElement x="415" y="10" width="50" height="20" uuid="0f86baff-6386-4f3f-b3fe-2388707babe8"/> + <box rightPadding="4"/> + <textElement textAlignment="Right"/> + <text><![CDATA[Date:]]></text> + </staticText> + <textField pattern="EEEEE dd MMMMM yyyy"> + <reportElement x="465" y="10" width="84" height="20" uuid="bb10dbe1-0a4f-4722-9953-c163b63cf979"/> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="95" y="0" width="210" height="25" uuid="e622555d-198b-4ccd-a4a1-c59c53304058"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="19" isBold="true"/> + </textElement> + <text><![CDATA[Comptes]]></text> + </staticText> + </band> + </title> + <columnHeader> + <band height="34"> + <staticText> + <reportElement x="465" y="0" width="84" height="25" uuid="6601e9af-af9a-4d29-952e-12b4920ac3ca"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="16" isBold="true"/> + </textElement> + <text><![CDATA[Libellé]]></text> + </staticText> + <staticText> + <reportElement x="0" y="0" width="84" height="25" uuid="ebe89a97-5d24-49b3-9afe-4499565a4f63"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="16" isBold="true"/> + </textElement> + <text><![CDATA[Numéro:]]></text> + </staticText> + </band> + </columnHeader> + <lastPageFooter> + <band height="44"/> + </lastPageFooter> +</jasperReport> diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index 59931eb..7164628 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-swing/pom.xml b/lima-swing/pom.xml index 58e300d..5edb383 100644 --- a/lima-swing/pom.xml +++ b/lima-swing/pom.xml @@ -175,6 +175,11 @@ <artifactId>commons-lang</artifactId> </dependency> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + </dependencies> <build> @@ -199,6 +204,25 @@ <plugins> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jasperreports-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>compile-reports</goal> + </goals> + </execution> + </executions> + <dependencies> + <!--note this must be repeated here to pick up correct xml validation --> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + </dependencies> + </plugin> + + <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> diff --git a/lima-swing/src/license/THIRD-PARTY.properties b/lima-swing/src/license/THIRD-PARTY.properties index 77768bf..32c4a2f 100644 --- a/lima-swing/src/license/THIRD-PARTY.properties +++ b/lima-swing/src/license/THIRD-PARTY.properties @@ -2,6 +2,7 @@ #------------------------------------------------------------------------------- # Already used licenses in project : # - AL 2.0 +# - Apache 2 # - Apache License 2.0 # - Apache License, Version 2.0 # - Apache License, version 2.0 @@ -9,18 +10,22 @@ # - Apache Software License 2.0 # - BSD # - BSD License +# - CDDL # - CDDL + GPLv2 with classpath exception # - CDDL 1.1 +# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 # - Common Development and Distribution License -# - Common Development and Distribution License (CDDL) v1.0 # - Common Public License Version 1.0 # - Eclipse Distribution License (EDL), Version 1.0 # - Eclipse Public License (EPL), Version 1.0 # - Eclipse Public License - Version 1.0 +# - GNU General Lesser Public License (LGPL) version 3.0 # - GNU General Public License, Version 2 with the Classpath Exception +# - GNU Lesser General Public Licence # - GNU Lesser General Public License # - GNU Library or Lesser General Public License # - GPL2 w/ CPE +# - GPLv2+CE # - General Public License (GPL) # - HSQLDB License, a BSD open source license # - LGPL 2.1 @@ -28,6 +33,7 @@ # - Lesser General Public License (LGPL) v 3.0 # - MIT License # - MPL 1.1 +# - Mozilla Public License Version 2.0 # - New BSD License # - Public Domain # - The Apache Software License, Version 2.0 @@ -39,9 +45,14 @@ # Please fill the missing licenses for dependencies : # # -#Mon Oct 27 23:36:14 CET 2014 +#Wed Oct 01 18:06:12 CEST 2014 commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0 commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=jdomlicence +eclipse--jdtcore--3.1.0=Eclipse Public License - v 1.0 +jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0 +org.codehaus.castor--castor--1.2=The Apache Software License, Version 2.0 org.metatype.sxc--sxc-jaxb-core--0.8=CDDL 1.1 org.metatype.sxc--sxc-runtime--0.8=CDDL 1.1 +org.olap4j--olap4j--0.9.7.309-JS-3=GNU Lesser General Public License +xml-apis--xml-apis--1.3.02=The Apache Software License, Version 2.0 diff --git a/lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml b/lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml new file mode 100644 index 0000000..014e820 --- /dev/null +++ b/lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> +<!-- 2014-10-02T11:45:07 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="AccountReportC" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="988d60dc-e878-4a6d-8789-7dffd9f27769"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="AccountBeanAdaptor2"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> + <property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/> + <style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/> + <style name="SubTitle" forecolor="#736343" fontName="Times New Roman" pdfFontName="Times-Roman" fontSize="18"/> + <style name="Column header" forecolor="#666666" fontName="Times New Roman" pdfFontName="Times-Roman" fontSize="12" isBold="true"/> + <style name="Detail" backcolor="#CCFFCC" fontName="Times New Roman" fontSize="12" pdfFontName="Times-Roman"/> + <style name="Row" mode="Transparent"> + <conditionalStyle> + <conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression> + <style backcolor="#E6DAC3"/> + </conditionalStyle> + </style> + <queryString language="SQL"> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <group name="Group1"> + <groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression> + </group> + <group name="Group2"> + <groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression> + </group> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="50" splitType="Stretch"> + <staticText> + <reportElement style="Title" x="170" y="0" width="263" height="30" uuid="f4b151ca-f4bb-45fa-8fa7-416c74bda6ed"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font fontName="Times New Roman" size="14" pdfFontName="Times-Roman"/> + </textElement> + <text><![CDATA[Liste des Comptes]]></text> + </staticText> + <textField pattern="EEEEE dd MMMMM yyyy"> + <reportElement style="Column header" x="450" y="10" width="115" height="20" forecolor="#736343" uuid="6e0a2e2e-bfe6-4208-b2b8-a2ee0fd23bc3"/> + <textElement verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + </band> + </title> + <pageHeader> + <band splitType="Stretch"/> + </pageHeader> + <columnHeader> + <band height="20" splitType="Stretch"> + <frame> + <reportElement mode="Opaque" x="100" y="0" width="100" height="20" forecolor="#B89F7D" backcolor="#F2EBDF" uuid="cfea52a4-a7c7-4222-96c0-3ff78a050aa4"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <staticText> + <reportElement x="0" y="0" width="100" height="20" uuid="0768a37f-c1c8-4247-9546-9ea7c6117ed9"/> + <box> + <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + </box> + <text><![CDATA[label]]></text> + </staticText> + </frame> + <frame> + <reportElement mode="Opaque" x="0" y="0" width="99" height="20" forecolor="#B89F7D" backcolor="#F2EBDF" uuid="13e75fe2-71fa-484b-9a2c-cd7a178deb17"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <staticText> + <reportElement x="0" y="0" width="99" height="20" uuid="cdbebdf6-fb7e-40a1-b5a3-00ac9d5389ef"/> + <box> + <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> + </box> + <text><![CDATA[Compte]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="20" splitType="Stretch"> + <textField> + <reportElement x="0" y="0" width="100" height="20" uuid="c940221c-a753-4c62-a407-465456d450b6"/> + <box> + <topPen lineWidth="0.5"/> + <leftPen lineWidth="0.5"/> + <bottomPen lineWidth="0.5"/> + <rightPen lineWidth="0.5"/> + </box> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="100" y="0" width="100" height="20" uuid="2a034b82-680f-47b7-b951-f11dd97ffabf"/> + <box> + <topPen lineWidth="0.5"/> + <leftPen lineWidth="0.5"/> + <bottomPen lineWidth="0.5"/> + <rightPen lineWidth="0.5"/> + </box> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="45" splitType="Stretch"/> + </columnFooter> + <pageFooter> + <band height="25" splitType="Stretch"> + <frame> + <reportElement mode="Opaque" x="-21" y="1" width="597" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="b5834407-22ff-4e5d-a7f8-3b5be0962706"/> + <textField evaluationTime="Report"> + <reportElement style="Column header" x="533" y="0" width="40" height="20" forecolor="#736343" uuid="df3c3050-1890-4a3b-a4b4-1e8f28016a1c"/> + <textElement verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Column header" x="453" y="0" width="80" height="20" forecolor="#736343" uuid="3d887e8a-f0d7-4d38-8553-dbf76dd04d36"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> + </textField> + <textField pattern="EEEEE dd MMMMM yyyy"> + <reportElement style="Column header" x="22" y="1" width="197" height="20" forecolor="#736343" uuid="1cc9564c-479d-46b3-a4bf-9221ae6d4f01"/> + <textElement verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + </frame> + </band> + </pageFooter> + <summary> + <band splitType="Stretch"/> + </summary> +</jasperReport> diff --git a/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml new file mode 100644 index 0000000..b26c9fe --- /dev/null +++ b/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml @@ -0,0 +1,292 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> +<!-- 2014-10-09T13:51:26 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="66929b65-d52d-4e6b-8d8e-8bd4ef5ac821"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="BalanceBeanAdapter"/> + <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="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="fromDate" class="java.util.Date"/> + <field name="toDate" class="java.util.Date"/> + <field name="currency" class="java.lang.String"/> + <field name="fromAccount" class="java.lang.String"/> + <field name="toAccount" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="balanceReportAccountPath" class="java.lang.String"/> + <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> + </variable> + <group name="accounts"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="74" splitType="Stretch"> + <frame> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textField pattern="dd/MM/yyyy"> + <reportElement 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 verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromDate}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="0" width="578" height="20" forecolor="#736343" uuid="e7bf1b4c-d748-4c99-b9e2-838903711b48"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font fontName="DejaVu Sans" size="14" isBold="true" pdfFontName="Times-Roman"/> + </textElement> + <text><![CDATA[Balance]]></text> + </staticText> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement x="480" y="0" width="98" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="422" y="0" width="58" height="20" forecolor="#736343" uuid="ddf50f55-7669-44be-b427-d03bc72cc264"/> + <textElement textAlignment="Center" verticalAlignment="Middle"/> + <text><![CDATA[Edition du:]]></text> + </staticText> + <staticText> + <reportElement x="190" y="20" width="20" height="20" forecolor="#736343" uuid="08282b18-8e67-4bcb-878e-ac97dc0bbc5b"> + <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> + <text><![CDATA[Du]]></text> + </staticText> + <staticText> + <reportElement x="290" y="20" width="20" height="20" forecolor="#736343" uuid="e149a451-2c1c-4d8d-9b01-85e35144eb86"> + <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> + <text><![CDATA[au]]></text> + </staticText> + <textField pattern="dd/MM/yyyy"> + <reportElement x="310" 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[$F{toDate}]]></textFieldExpression> + </textField> + </frame> + <staticText> + <reportElement x="0" y="53" width="40" height="20" forecolor="#736343" uuid="02207af8-5ccd-43c9-b475-acb534bcd6cf"/> + <text><![CDATA[Devise:]]></text> + </staticText> + <textField> + <reportElement x="41" y="53" width="100" height="20" forecolor="#736343" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textFieldExpression><![CDATA[$F{currency}]]></textFieldExpression> + </textField> + </band> + </title> + <pageHeader> + <band height="38" splitType="Stretch"> + <staticText> + <reportElement x="0" y="9" width="50" height="16" uuid="33ba6496-bc27-466f-9764-7336b6741c13"/> + <textElement> + <font isItalic="true"/> + </textElement> + <text><![CDATA[Comptes :]]></text> + </staticText> + <staticText> + <reportElement x="100" y="9" width="20" height="16" uuid="cd1272d9-f113-4552-a19f-941ec046265e"/> + <textElement> + <font isItalic="true"/> + </textElement> + <text><![CDATA[à :]]></text> + </staticText> + <textField isBlankWhenNull="true"> + <reportElement x="50" y="9" width="50" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> + <textElement> + <font isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromAccount}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="120" y="9" width="80" height="16" uuid="05525266-9965-4412-bef5-eb7dc7b1be42"/> + <textElement> + <font isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{toAccount}]]></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="#F2EBDF" 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Compte]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Intitulé]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Total Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Solde Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="21" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceReportAccountPath})]]></subreportExpression> + </subreport> + </band> + </detail> + <pageFooter> + <band height="54" splitType="Stretch"/> + </pageFooter> +</jasperReport> diff --git a/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml new file mode 100644 index 0000000..c2be540 --- /dev/null +++ b/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> +<!-- 2014-10-09T13:04: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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <field name="subAccounts" class="java.util.List"/> + <field name="balanceSubAccountsReportPath" class="java.lang.String"/> + <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> + </subreport> + </band> + <band height="11" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8" isBold="true"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="1"> + <line> + <reportElement x="0" y="0" width="578" height="1" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> + </line> + </band> + </columnFooter> +</jasperReport> diff --git a/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml new file mode 100644 index 0000000..53bfca0 --- /dev/null +++ b/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> +<!-- 2014-10-09T13:05:11 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="Courier 10 Pitch" size="8"/> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> +</jasperReport> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java new file mode 100644 index 0000000..3b734a2 --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java @@ -0,0 +1,107 @@ +package org.chorem.lima.ui.report; + +/* + * #%L + * Lima :: Swing + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JasperCompileManager; +import net.sf.jasperreports.engine.JasperExportManager; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaTechnicalException; +import java.io.File; +import org.apache.commons.logging.Log; +import org.chorem.lima.ui.report.dataSource.AccountCustomDataSourceFabric; +import org.chorem.lima.ui.report.dataSource.BalanceCustomDataSourceFabric; + +import java.util.HashMap; + +/** + * Created by davidcosse on 02/10/14. + */ +public class ReportBuilder { + + private static final Log log = LogFactory.getLog(ReportBuilder.class); + + protected JasperReport accountReport; + protected JasperReport balanceReport; + + // TODO DCossé 02/10/14 remove it as soon as maven jasper plugin works + public ReportBuilder() { + try { + // compile phase + String rootPath = new File("").getAbsolutePath(); + accountReport = JasperCompileManager.compileReport(rootPath + "/src/main/jasperreports/accounts/AccountReport.jrxml"); + balanceReport= JasperCompileManager.compileReport(rootPath + "/src/main/jasperreports/balance/BalanceReport.jrxml"); + } catch (JRException e) { + throw new LimaTechnicalException(e); + } + } + + + public void generateAccountReport(String path) { + + try { + // fill up report + JasperPrint jasperPrint = JasperFillManager.fillReport(accountReport, new HashMap(), new JRBeanCollectionDataSource(ReportFactory.createNewAccountBeanDocument())); + // same as before but with call to custom datasource +// JasperPrint jasperPrint = JasperFillManager.fillReport(accountReport, new HashMap(), new AccountCustomDataSourceFabric.AccountCustomDataSource()); + + // eport to PDF + JasperExportManager.exportReportToPdfFile(jasperPrint, path); + if (log.isInfoEnabled()) { + log.info("Rapport généré:"+path); + } + + } catch (JRException e) { + throw new LimaTechnicalException(e); + } + + } + + public void generateBalanceReport(String path) { + + try { + // fill up report + JasperPrint jasperPrint = JasperFillManager.fillReport(balanceReport, new HashMap(), new JRBeanCollectionDataSource(ReportFactory.createBalanceBeanCollection())); + // same as before but with call to custom datasource +// JasperPrint jasperPrint = JasperFillManager.fillReport(balanceReport, new HashMap(), new BalanceCustomDataSourceFabric.BalanceCustomData()); + + // eport to PDF + JasperExportManager.exportReportToPdfFile(jasperPrint, path); + if (log.isInfoEnabled()) { + log.info("Rapport généré:"+path); + } + + } catch (JRException e) { + throw new LimaTechnicalException(e); + } + + } + + public void generateBalanceReportAccount() { + + } +} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java new file mode 100644 index 0000000..a55a9e5 --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java @@ -0,0 +1,148 @@ +package org.chorem.lima.ui.report; + +/* + * #%L + * Lima :: Swing + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.common.collect.Lists; +import net.sf.jasperreports.engine.JRDataSource; +import org.chorem.lima.beans.AccountBean; +import org.chorem.lima.beans.AccountBeanImpl; +import org.chorem.lima.beans.BalanceReport; +import org.chorem.lima.beans.BalanceReportAccount; +import org.chorem.lima.beans.BalanceReportAccountImpl; +import org.chorem.lima.beans.BalanceReportImpl; +import org.chorem.lima.business.api.AccountService; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.report.dataSource.AccountCustomDataSourceFabric; + +import java.io.File; +import java.util.Date; +import java.util.List; + +/** + * Created by davidcosse on 02/10/14. + */ +public class ReportFactory { + + protected static AccountService accountService; + protected static String rootPath = new File("").getAbsolutePath(); + protected static String balanceReportAccountReportPath = rootPath + "/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml"; + protected static String balanceSubAccountsReport = rootPath + "/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml"; + + + public static List<org.chorem.lima.entity.Account> createNewAccountDocument() { + accountService = LimaServiceFactory.getService(AccountService.class); + List<org.chorem.lima.entity.Account> accounts = accountService.getAllAccounts(); + return accounts; + } + + public static List<AccountBean> createNewAccountBeanDocument() { + AccountBean a1 = new AccountBeanImpl(); + a1.setAccountNumber("000"); + a1.setLabel("premier"); + + AccountBean a2 = new AccountBeanImpl(); + a2.setAccountNumber("001"); + a2.setLabel("deuxième"); + + AccountBean a3 = new AccountBeanImpl(); + a3.setAccountNumber("002"); + a3.setLabel("troisième"); + + AccountBean a4 = new AccountBeanImpl(); + a4.setAccountNumber("003"); + a4.setLabel("quatrième"); + List<AccountBean> accounts = Lists.newArrayList(a1, a2, a3, a4); + return accounts; + } + + public static List<BalanceReport> createBalanceBeanCollection() { + BalanceReport br0 = new BalanceReportImpl(); + br0.setCurrency("EURO"); + br0.setFromAccount("100000"); + br0.setToAccount("999999"); + br0.setFromDate(new Date()); + br0.setToDate(new Date()); + br0.setBalanceReportAccountPath(balanceReportAccountReportPath); + + BalanceReportAccount class1 = new BalanceReportAccountImpl(); + class1.setBalanceSubAccountsReportPath(balanceSubAccountsReport); + br0.addAccounts(class1); + + class1.setAccountNumber("100000"); + class1.setLabel("TOTAL 1"); + class1.setAmountDebit("1 176 285.16"); + class1.setAmountCredit("224 466.74"); + class1.setSoldeDebit("1 007 245.42"); + class1.setSoldeCredit("55 427.00"); + + BalanceReportAccount a110000 = new BalanceReportAccountImpl(); + a110000.setAccountNumber("110000"); + a110000.setLabel("report à nouveau"); + a110000.setAmountDebit("2 677.00"); + a110000.setAmountCredit("1 343.00"); + a110000.setSoldeDebit("1 334.00"); + + BalanceReportAccount a108 = new BalanceReportAccountImpl(); + a108.setAccountNumber("108000"); + a108.setLabel("Compte de l'exploitant"); + a108.setAmountDebit("27 023.73"); + a108.setAmountCredit("15 300.00"); + a108.setSoldeDebit("11 723.73"); + + class1.addSubAccounts(a110000); + class1.addSubAccounts(a108); + + BalanceReportAccount class2 = new BalanceReportAccountImpl(); + class2.setBalanceSubAccountsReportPath(balanceSubAccountsReport); + br0.addAccounts(class2); + + class2.setAccountNumber("200000"); + class2.setLabel("TOTAL 2"); + class2.setAmountDebit("2 867 904.76"); + class2.setAmountCredit("2 867 904.76"); + class2.setSoldeDebit("1 979 199.44"); + class2.setSoldeCredit("1 979 199.44"); + + BalanceReportAccount a2815 = new BalanceReportAccountImpl(); + a2815.setAccountNumber("a28150"); + a2815.setLabel("Installations techniques; matériel et outillage industriels"); + a2815.setAmountDebit("37 446.00"); + a2815.setAmountCredit("32 020.00"); + a2815.setSoldeDebit("5 426.00"); + + BalanceReportAccount a28130000 = new BalanceReportAccountImpl(); + a28130000.setAccountNumber("28130000"); + a28130000.setLabel("Constructions même ventilation que celle du compte 213"); + + class2.addSubAccounts(a2815); + class2.addSubAccounts(a28130000); + + List<BalanceReport> result = Lists.newArrayList(br0); + return result; + } + + public static JRDataSource getAccountJRDatadSource() { + return new AccountCustomDataSourceFabric.AccountCustomDataSource(); + } + +} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java new file mode 100644 index 0000000..3760dbb --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java @@ -0,0 +1,137 @@ +package org.chorem.lima.ui.report.dataSource; + +/* + * #%L + * Lima :: Swing + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JRDataSource; +import net.sf.jasperreports.engine.JRDataSourceProvider; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.base.JRBaseField; +import org.chorem.lima.beans.AccountBean; +import org.chorem.lima.ui.report.ReportFactory; + +import java.util.HashMap; +import java.util.List; + +/** + * Created by davidcosse on 28/10/14. + */ +public class AccountCustomDataSourceFabric { + /** + * Created by davidcosse on 03/10/14. + * this class will be removed. + * It show how to configure a custom datasource + */ + public static class AccountDataSourceProvider implements JRDataSourceProvider { + + private class AccountField extends JRBaseField { + + private static final long serialVersionUID = 4771755443118002691L; + + public AccountField(String name, String description, Class<?> type) { + this.name = name; + this.description = description; + this.valueClass = type; + this.valueClassName = type.getName(); + } + + public AccountField(String name,String description){ + this(name, description, String.class); + } + } + + @Override + public boolean supportsGetFieldsOperation() { + return true; + } + + @Override + public JRField[] getFields(JasperReport report) throws JRException, UnsupportedOperationException { + JRField field1 = new AccountField("accountNumber","Account number"); + JRField field2 = new AccountField("label","acount description"); + return new JRField[]{field1, field2}; + } + + @Override + public JRDataSource create(JasperReport report) throws JRException { + return new AccountCustomDataSource(ReportFactory.createNewAccountBeanDocument()); + } + + @Override + public void dispose(JRDataSource dataSource) throws JRException { + + } + } + + /** + * Created by davidcosse on 03/10/14. + */ + public static class AccountCustomDataSource implements JRDataSource { + + private static List<AccountBean> accounts; + + public AccountCustomDataSource() { + this.accounts= ReportFactory.createNewAccountBeanDocument(); + } + + public AccountCustomDataSource(List<AccountBean> accounts) { + this.accounts = accounts; + } + + /** + * Variables to store the number of fields, and their names, in the report + */ + private HashMap<String, Integer> fieldsNumber = new HashMap<String, Integer>(); + private int lastFieldsAdded = 0; + + /** + * Variable to store how much records were read + */ + private int counter = -1; + + @Override + public boolean next() throws JRException { + if (counter<accounts.size()-1) { + counter++; + return true; + } + return false; + } + + @Override + public Object getFieldValue(JRField jrField) throws JRException { + Integer fieldIndex; + if (fieldsNumber.containsKey(jrField.getName())) + fieldIndex = fieldsNumber.get(jrField.getName()); + else { + fieldsNumber.put(jrField.getName(), lastFieldsAdded); + fieldIndex = lastFieldsAdded; + lastFieldsAdded ++; + } + if (fieldIndex == 0) return accounts.get(counter).getAccountNumber(); + else if (fieldIndex == 1) return accounts.get(counter).getLabel(); + return ""; + } + } +} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java new file mode 100644 index 0000000..f432eff --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java @@ -0,0 +1,147 @@ +package org.chorem.lima.ui.report.dataSource; + +/* + * #%L + * Lima :: Swing + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JRDataSource; +import net.sf.jasperreports.engine.JRDataSourceProvider; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.base.JRBaseField; +import org.chorem.lima.beans.BalanceReport; +import org.chorem.lima.ui.report.ReportFactory; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +/** + * Created by davidcosse on 28/10/14. + * this class will be removed. + * It show how to configure a custom datasource + */ +public class BalanceCustomDataSourceFabric { + + /** + * Created by davidcosse on 28/10/14. + */ + public static class BalanceDataSourceProvider implements JRDataSourceProvider { + + private class BalanceField extends JRBaseField { + + private static final long serialVersionUID = 1L; + + public BalanceField(String name, String description, Class<?> type) { + this.name = name; + this.description = description; + this.valueClass = type; + this.valueClassName = type.getName(); + } + + public BalanceField(String name,String description){ + this(name, description, String.class); + } + } + + @Override + public boolean supportsGetFieldsOperation() { + return true; + } + + @Override + public JRField[] getFields(JasperReport report) throws JRException, UnsupportedOperationException { + JRField field1 = new BalanceField("fromDate","du", Date.class); + JRField field2 = new BalanceField("toDate","au", Date.class); + JRField field3 = new BalanceField("currency","currency"); + JRField field4 = new BalanceField("fromAccount","du compte"); + JRField field5 = new BalanceField("toAccount","jusqu'au compte"); + JRField field6 = new BalanceField("accounts","comptes", List.class); + + return new JRField[]{field1, field2, field3, field4, field5, field6}; + } + + @Override + public JRDataSource create(JasperReport report) throws JRException { + return new BalanceCustomData(ReportFactory.createBalanceBeanCollection()); + } + + @Override + public void dispose(JRDataSource dataSource) throws JRException { + + } + } + + + public static class BalanceCustomData implements JRDataSource { + private static List<BalanceReport> balanceReports; + + public BalanceCustomData() { + this.balanceReports = ReportFactory.createBalanceBeanCollection(); + } + + public BalanceCustomData(List<BalanceReport> balances) { + this.balanceReports = balances; + } + + /** + * Variables to store the number of fields, and their names, in the report + */ + private HashMap<String, Integer> fieldsNumber = new HashMap<String, Integer>(); + private int lastFieldsAdded = 0; + + /** + * Variable to store how much records were read + */ + private int counter = -1; + + @Override + public boolean next() throws JRException { + if (counter < balanceReports.size() - 1) { + counter++; + return true; + } + return false; + } + + @Override + public Object getFieldValue(JRField jrField) throws JRException { + Integer fieldIndex; + if (fieldsNumber.containsKey(jrField.getName())) + fieldIndex = fieldsNumber.get(jrField.getName()); + else { + fieldsNumber.put(jrField.getName(), lastFieldsAdded); + fieldIndex = lastFieldsAdded; + lastFieldsAdded++; + } + + if (fieldIndex == 0) return balanceReports.get(counter).getFromDate(); + else if (fieldIndex == 1) return balanceReports.get(counter).getToDate(); + else if (fieldIndex == 2) return balanceReports.get(counter).getCurrency(); + else if (fieldIndex == 3) return balanceReports.get(counter).getFromAccount(); + else if (fieldIndex == 4) return balanceReports.get(counter).getToAccount(); + else if (fieldIndex == 5) return balanceReports.get(counter).getAccounts(); + return ""; + } + + } +} diff --git a/lima-swing/src/main/resources/import/vat_shortened.csv b/lima-swing/src/main/resources/import/vat_shortened.csv index 7fafb1e..7340721 100644 --- a/lima-swing/src/main/resources/import/vat_shortened.csv +++ b/lima-swing/src/main/resources/import/vat_shortened.csv @@ -1,4 +1,4 @@ -label;header;accounts;boxName;masterVATStatement +gijava 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.) diff --git a/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java b/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java new file mode 100644 index 0000000..5aef5a8 --- /dev/null +++ b/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java @@ -0,0 +1,653 @@ +/* + * #%L + * $Id: AbstractLimaTest.java 3929 2014-09-29 16:26:31Z dcosse $ + * $HeadURL: http://svn.chorem.org/lima/trunk/lima-business/src/test/java/org/chorem/lima... $ + * %% + * Copyright (C) 2011 - 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% + */ + +package org.chorem.lima.ui; + +import com.google.common.base.Function; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceConfig; +import org.chorem.lima.business.api.AccountService; +import org.chorem.lima.business.api.EntryBookService; +import org.chorem.lima.business.api.EntryService; +import org.chorem.lima.business.api.ExportService; +import org.chorem.lima.business.api.FinancialPeriodService; +import org.chorem.lima.business.api.FinancialStatementService; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.FiscalPeriodService; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.ImportService; +import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.api.VatStatementService; +import org.chorem.lima.entity.Account; +import org.chorem.lima.entity.AccountTopiaDao; +import org.chorem.lima.entity.LimaCallaoEntityEnum; +import org.chorem.lima.entity.LimaCallaoTopiaApplicationContext; +import org.chorem.lima.entity.LimaCallaoTopiaPersistenceContext; +import org.chorem.lima.service.LimaServiceFactory; +import org.hibernate.cfg.Environment; +import org.junit.Before; +import org.nuiton.i18n.I18n; +import org.nuiton.i18n.init.ClassPathI18nInitializer; +import org.nuiton.topia.persistence.TopiaApplicationContextCache; + +import java.io.File; +import java.io.IOException; +import java.text.DateFormat; +import java.util.Locale; +import java.util.Properties; +import java.util.UUID; + +/** + * Common initialization code for all lima tests. + * + * @author chatellier + * @version $Revision: 3929 $ + * <p/> + * Last update : $Date: 2014-09-29 18:26:31 +0200 (lun. 29 sept. 2014) $ + * By : $Author: dcosse $ + */ +public abstract class AbstractLimaTest { + + protected static final Log log = LogFactory.getLog(AbstractLimaTest.class); + protected static final Function<Properties, LimaCallaoTopiaApplicationContext> CREATE_CONTEXT_FUNCTION = new Function<Properties, LimaCallaoTopiaApplicationContext>() { + @Override + public LimaCallaoTopiaApplicationContext apply(Properties input) { + return new LimaCallaoTopiaApplicationContext(input); + } + }; + + protected static DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.ENGLISH); + protected static final String LIMA_TEST_DEFAULT_CONF_FILENAME = "lima-test.properties"; + + protected AccountService accountService; + protected EntryBookService entryBookService; + protected FinancialPeriodService financialPeriodService; + protected FinancialTransactionService financialTransactionService; + protected FiscalPeriodService fiscalPeriodService; + protected ReportService reportService; + protected EntryService entryService; + protected ImportService importService; + protected ExportService exportService; + protected FinancialStatementService financialStatementService; + protected VatStatementService vatStatementService; + protected IdentityService identityService; + + protected LimaCallaoTopiaApplicationContext context; + + /** + * This is a before class method, but junit will fail to run inherited + * BeforeClass methods if there is one. + * + * @throws Exception + */ + @Before + public void initAbstractTest() throws Exception { + setUpLocale(); + Properties options = getTestConfiguration(); + new LimaTestsConfig(LIMA_TEST_DEFAULT_CONF_FILENAME, options); + initServices(); + context = createNewTestApplicationContext(); + } + + protected void setUpLocale() throws Exception { + I18n.init(new ClassPathI18nInitializer(), Locale.UK); + } + + /** + * Init services after i18n#init(). + * @throws java.io.IOException + */ + protected void initServices() throws IOException { + if(accountService == null) { + LimaServiceFactory.initFactory(LimaServiceConfig.getInstance().getConfig()); + accountService = LimaServiceFactory.getService(AccountService.class); + entryBookService = LimaServiceFactory.getService(EntryBookService.class); + financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class); + financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + reportService = LimaServiceFactory.getService(ReportService.class); + entryService = LimaServiceFactory.getService(EntryService.class); + financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); + vatStatementService = LimaServiceFactory.getService(VatStatementService.class); + + importService = LimaServiceFactory.getService(ImportService.class); + exportService = LimaServiceFactory.getService(ExportService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + } + } + + /** + * Return a new instance of configuration defined on a new database at + * each call. + * + * @return single test config + */ + protected Properties getTestConfiguration() { + + // do not call parse() method (don't read /etc...) + // load file manually (lima.properties) + Properties testProperties = new Properties(); + // override somes + String testDir = System.getProperty("java.io.tmpdir") + File.separator + "lima-business-" + UUID.randomUUID().toString(); + testProperties.setProperty(LimaServiceConfig.ServiceConfigOption.DATA_DIR.getKey(), testDir); + testProperties.setProperty(Environment.URL, "jdbc:h2:file:" + testDir + File.separator + "data"); + testProperties.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, "thread"); + testProperties.setProperty("topia.persistence.classes", LimaCallaoEntityEnum.getImplementationClassesAsString()); + return testProperties; + } + + /** + * Method to use only for class that need a context to be tester. + * Only for DOA for now. + * + * @return a topia context + */ + protected LimaCallaoTopiaApplicationContext getTestApplicationContext(Properties options) { + log.info("Opening context to database : " + options.getProperty("hibernate.connection.url")); + + LimaCallaoTopiaApplicationContext result = TopiaApplicationContextCache.getContext(options, CREATE_CONTEXT_FUNCTION); + return result; + } + + protected LimaCallaoTopiaApplicationContext createNewTestApplicationContext() { + Properties options = LimaServiceConfig.getInstance().getFlatOptions(); + LimaCallaoTopiaApplicationContext result = getTestApplicationContext(options); + return result; + } + + /** + * Create a basic account plan. + * + * @throws org.chorem.lima.business.exceptions.LimaException + * @throws java.text.ParseException + */ + protected void initTestDefaultAccounts() throws Exception { + LimaCallaoTopiaPersistenceContext tcontext = context.newPersistenceContext(); + AccountTopiaDao accountTopiaDao = tcontext.getAccountDao(); + + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1", Account.PROPERTY_LABEL, "COMPTES DE CAPITAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2", Account.PROPERTY_LABEL, "COMPTES D'IMMOBILISATIONS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "3", Account.PROPERTY_LABEL, "COMPTES DE STOCKS ET D'EN-COURS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4", Account.PROPERTY_LABEL, "COMPTES DE TIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5", Account.PROPERTY_LABEL, "COMPTES FINANCIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6", Account.PROPERTY_LABEL, "COMPTES DE CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7", Account.PROPERTY_LABEL, "COMPTES DE PRODUITS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "8", Account.PROPERTY_LABEL, "COMPTES SPECIAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "10", Account.PROPERTY_LABEL, "REPORT A NOUVEAU (solde créditeur ou débiteur)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "11", Account.PROPERTY_LABEL, "RESULTAT NET DE L'EXERCICE (bénéfice ou perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "12", Account.PROPERTY_LABEL, "PROVISIONS REGLEMENTEES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "13", Account.PROPERTY_LABEL, "PROVlSlONS POUR RISQUES ET CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "14", Account.PROPERTY_LABEL, "EMPRUNTS ET DETTES ASSIMILEES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "15", Account.PROPERTY_LABEL, "IMMOBlLlSATIONS CORPORELLES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "16", Account.PROPERTY_LABEL, "IMMOBILlSATlONS EN COURS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "17", Account.PROPERTY_LABEL, "AUTRES IMMOBILISATIONS FINANCIERES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "20", Account.PROPERTY_LABEL, "MATIERES PREMIERES (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "21", Account.PROPERTY_LABEL, "AUTRES APPROVISIONNEMENTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "23", Account.PROPERTY_LABEL, "EN-COURS DE PRODUCTION DE BIENS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "26", Account.PROPERTY_LABEL, "EN-COURS DE PRODUCTION DE SERVICES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27", Account.PROPERTY_LABEL, "STOCKS DE PRODUITS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "28", Account.PROPERTY_LABEL, "STOCKS DE MARCHANDISES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "29", Account.PROPERTY_LABEL, "SECURITE SOCIALE ET AUTRES ORGANISMES SOCIAUX"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "31", Account.PROPERTY_LABEL, "DEBITEURS ET CREDITEURS DIVERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "32", Account.PROPERTY_LABEL, "COMPTES TRANSITOIRES OU D'ATTENTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "33", Account.PROPERTY_LABEL, "VALEURS MOBILIERES DE PLACEMENT"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "34", Account.PROPERTY_LABEL, "BANQUES; ETABLISSEMENTS FINANCIERS ET ASSIMILES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "35", Account.PROPERTY_LABEL, "CAISSE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "37", Account.PROPERTY_LABEL, "REGIES D'AVANCES ET ACCREDITIFS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "39", Account.PROPERTY_LABEL, "VIREMENTS INTERNES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "40", Account.PROPERTY_LABEL, "ACHATS (sauf 603)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "41", Account.PROPERTY_LABEL, "Services extérieurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "42", Account.PROPERTY_LABEL, "Autres services extérieurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "43", Account.PROPERTY_LABEL, "IMPOTS; TAXES ET VERSEMENTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44", Account.PROPERTY_LABEL, "AUTRES CHARGES DE GESTION COURANTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "45", Account.PROPERTY_LABEL, "CHARGES FINANCIERES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "46", Account.PROPERTY_LABEL, "CHARGES EXCEPTIONNELLES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "47", Account.PROPERTY_LABEL, "PRODUCTION IMMOBILISEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "48", Account.PROPERTY_LABEL, "SUBVENTlONS D'EXPLOITATION"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "49", Account.PROPERTY_LABEL, "AUTRES PRODUITS DE GESTION COURANTE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "50", Account.PROPERTY_LABEL, "PRODUITS FINANCIERS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "51", Account.PROPERTY_LABEL, "PRODUITS EXCEPTIONNELS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "52", Account.PROPERTY_LABEL, "REPRISES SUR AMORTISSEMENTS ET PROVISIONS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "53", Account.PROPERTY_LABEL, "TRANSFERTS DE CHARGES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "54", Account.PROPERTY_LABEL, "ENGAGEMENTS HORS BILAN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "58", Account.PROPERTY_LABEL, "RESULTAT EN INSTANCE D'AFFECTATION"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "59", Account.PROPERTY_LABEL, "BILAN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "60", Account.PROPERTY_LABEL, "Capital"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "61", Account.PROPERTY_LABEL, "Ecarts de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "62", Account.PROPERTY_LABEL, "Compte de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "63", Account.PROPERTY_LABEL, "Résultat de l'exercice (bénéfice)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "64", Account.PROPERTY_LABEL, "Résultat de l'exercice (perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "65", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "66", Account.PROPERTY_LABEL, "Provision spéciale de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "67", Account.PROPERTY_LABEL, "Plus-values réinvesties"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68", Account.PROPERTY_LABEL, "Autres provisions réglementées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "69", Account.PROPERTY_LABEL, "Provisions pour risques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "70", Account.PROPERTY_LABEL, "Autres emprunts obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "71", Account.PROPERTY_LABEL, "Emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "72", Account.PROPERTY_LABEL, "Primes de remboursement des obligations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "74", Account.PROPERTY_LABEL, "Dettes rattachées a des participations (groupe)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "75", Account.PROPERTY_LABEL, "Frais détablissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "76", Account.PROPERTY_LABEL, "Frais de recherche et de développement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "77", Account.PROPERTY_LABEL, "Concessions et droits similaires; brevets; licences; marques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78", Account.PROPERTY_LABEL, "Droit au bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "79", Account.PROPERTY_LABEL, "Fonds commercial"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "80", Account.PROPERTY_LABEL, "Autres immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "88", Account.PROPERTY_LABEL, "Dépôts et cautionnements versés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "89", Account.PROPERTY_LABEL, "Amortissements des immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "101", Account.PROPERTY_LABEL, "Amortissements des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "104", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "105", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "106", Account.PROPERTY_LABEL, "Provisions pour dépréciation des participations et créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "107", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres immobilisations fina"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "108", Account.PROPERTY_LABEL, "Provisions pour dépréciation des matières premières (et four"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "109", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres approvisionnements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "110", Account.PROPERTY_LABEL, "Provisions pour dépréciation des encours de production de bi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "119", Account.PROPERTY_LABEL, "Provisions pour dépréciation des en-cours de production de s"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "120", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "129", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "131", Account.PROPERTY_LABEL, "Personnel - Rémunérations dues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "138", Account.PROPERTY_LABEL, "Personnel - Charges à payer et produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "139", Account.PROPERTY_LABEL, "Sécurité sociale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "142", Account.PROPERTY_LABEL, "Autres organismes sociaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "143", Account.PROPERTY_LABEL, "Etat - Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "144", Account.PROPERTY_LABEL, "Etat - Taxes sur le chiffre d'affaires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "145", Account.PROPERTY_LABEL, "Obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "146", Account.PROPERTY_LABEL, "Autres impôts; taxes et versements assimilés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "147", Account.PROPERTY_LABEL, "Associés - Comptes courants"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "148", Account.PROPERTY_LABEL, "Créances sur cessions d'immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "151", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "153", Account.PROPERTY_LABEL, "Charges à repartir sur plusieurs exercices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "154", Account.PROPERTY_LABEL, "Charges constatées d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "155", Account.PROPERTY_LABEL, "Produits constatés d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "156", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de clients"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "157", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de débiteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "158", Account.PROPERTY_LABEL, "Valeurs à I'encaissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "161", Account.PROPERTY_LABEL, "Banques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "163", Account.PROPERTY_LABEL, "Autres organismes financiers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "164", Account.PROPERTY_LABEL, "Concours bancaires courant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "165", Account.PROPERTY_LABEL, "Caisse siège social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "166", Account.PROPERTY_LABEL, "Virements internes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "167", Account.PROPERTY_LABEL, "Provisions pour dépréciation des valeurs mobilières de place"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "168", Account.PROPERTY_LABEL, "Achats stockés - Matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "169", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (approvisionnements et marchandises)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "171", Account.PROPERTY_LABEL, "Achat de materiel; equipement et travaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "174", Account.PROPERTY_LABEL, "Achats non stockes de matières et fournitures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "178", Account.PROPERTY_LABEL, "Achats de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "201", Account.PROPERTY_LABEL, "Frais accessoires d'achat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "203", Account.PROPERTY_LABEL, "Rabais; remises et ristournes obtenus sur achats"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "205", Account.PROPERTY_LABEL, "Sous-traitance générale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "206", Account.PROPERTY_LABEL, "Redevances de crédit-bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "207", Account.PROPERTY_LABEL, "Locations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "208", Account.PROPERTY_LABEL, "Charges locatives et de copropriété"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "211", Account.PROPERTY_LABEL, "Entretien et réparations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "212", Account.PROPERTY_LABEL, "Primes d'assurance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "213", Account.PROPERTY_LABEL, "Personnel extérieur à l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "214", Account.PROPERTY_LABEL, "Rémunérations intermédiaires et honoraires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "215", Account.PROPERTY_LABEL, "Publicité; publications; relations publiques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "218", Account.PROPERTY_LABEL, "Transports de biens et transports collectifs du personnel"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "231", Account.PROPERTY_LABEL, "Déplacements; missions et réceptions"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "232", Account.PROPERTY_LABEL, "Frais postaux et frais de télécommunications"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "237", Account.PROPERTY_LABEL, "Services bancaires et assimiles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "238", Account.PROPERTY_LABEL, "Impôts; taxes et versements assimiles sur rémunérations (aut"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "261", Account.PROPERTY_LABEL, "Autres impôts taxes et versements assimiles (administration"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "266", Account.PROPERTY_LABEL, "Rémunération du travail de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "267", Account.PROPERTY_LABEL, "Charges de sécurité sociale et de prévoyance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "268", Account.PROPERTY_LABEL, "Redevances pour concessions; brevets; licences; marques; pro"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "269", Account.PROPERTY_LABEL, "Pertes sur créances irrécouvrables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "271", Account.PROPERTY_LABEL, "Quote-part de résultat sur opérations faites en commun"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "272", Account.PROPERTY_LABEL, "Escomptes accordés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "273", Account.PROPERTY_LABEL, "Valeurs comptables des éléments d'actif cédés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "274", Account.PROPERTY_LABEL, "Dotations aux amort. - Charges d'exploitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "275", Account.PROPERTY_LABEL, "Dotations aux amortissements et aux provisions - Charges fin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "276", Account.PROPERTY_LABEL, "Dotations aux amortissements et aux provisions - Charges exc"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "279", Account.PROPERTY_LABEL, "Participation des salaries aux fruits de l'expansion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "280", Account.PROPERTY_LABEL, "Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "281", Account.PROPERTY_LABEL, "Imposition forfaitaire annuelle des sociétés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "290", Account.PROPERTY_LABEL, "Produits - Reports en arrière des déficits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "291", Account.PROPERTY_LABEL, "Ventes de produits finis"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "293", Account.PROPERTY_LABEL, "Prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "296", Account.PROPERTY_LABEL, "Ventes de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "297", Account.PROPERTY_LABEL, "Produits des activités annexes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "311", Account.PROPERTY_LABEL, "Rabais; remises et ristournes accordées par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "312", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (en-cours de production; produits)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "317", Account.PROPERTY_LABEL, "Immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "321", Account.PROPERTY_LABEL, "Produits divers de gestion courante"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "322", Account.PROPERTY_LABEL, "Escomptes obtenus"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "326", Account.PROPERTY_LABEL, "Produits des cessions éléments d'actif"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "331", Account.PROPERTY_LABEL, "Reprises sur amortissements et provisions (à inscrire dans l"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "335", Account.PROPERTY_LABEL, "Reprises sur provisions a inscrire dans les produits financi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "341", Account.PROPERTY_LABEL, "Reprises sur provisions (à inscrire dans les produits except"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "345", Account.PROPERTY_LABEL, "Transfert de charges d'exploitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "351", Account.PROPERTY_LABEL, "Engagements donnés par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "355", Account.PROPERTY_LABEL, "Engagements reçus par l'entreprise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "358", Account.PROPERTY_LABEL, "Contrepartie des engagements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "371", Account.PROPERTY_LABEL, "Réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "372", Account.PROPERTY_LABEL, "Réserves indisponibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "391", Account.PROPERTY_LABEL, "Réserves statutaires ou contractuelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "392", Account.PROPERTY_LABEL, "Réserves réglementes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "393", Account.PROPERTY_LABEL, "Autres réserves"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "394", Account.PROPERTY_LABEL, "Provisions pour charges sociales et fiscales sur congés à pa"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "395", Account.PROPERTY_LABEL, "Matériel industriel (1)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "397", Account.PROPERTY_LABEL, "Matériel de transport"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "400", Account.PROPERTY_LABEL, "Matériel de bureau et matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "401", Account.PROPERTY_LABEL, "Frais établissement (même ventilation que celle du compte 20"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "403", Account.PROPERTY_LABEL, "Constructions même ventilation que celle du compte 213)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "404", Account.PROPERTY_LABEL, "Installations techniques; matériel et outillage industriels"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "405", Account.PROPERTY_LABEL, "Dettes provisionnées pour congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "408", Account.PROPERTY_LABEL, "Autres charges à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "409", Account.PROPERTY_LABEL, "Obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "410", Account.PROPERTY_LABEL, "tva cee"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "411", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires déductibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "413", Account.PROPERTY_LABEL, "Produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "416", Account.PROPERTY_LABEL, "Reglement par chèques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "417", Account.PROPERTY_LABEL, "Réglement par CB"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "418", Account.PROPERTY_LABEL, "Réglement par LCR"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "419", Account.PROPERTY_LABEL, "Réglement en especes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "421", Account.PROPERTY_LABEL, "Intérêts courus à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "422", Account.PROPERTY_LABEL, "Crédit de mobilisation de créances commerciales (CMCC)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "424", Account.PROPERTY_LABEL, "Mobilisation de créances nées à létranger"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "425", Account.PROPERTY_LABEL, "Fournitures consommables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "426", Account.PROPERTY_LABEL, "Variation des stocks de matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "427", Account.PROPERTY_LABEL, "Variation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "428", Account.PROPERTY_LABEL, "Achat marchandise CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "431", Account.PROPERTY_LABEL, "Achats en francise"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "437", Account.PROPERTY_LABEL, "Malis sur emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "438", Account.PROPERTY_LABEL, "Honoraires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "441", Account.PROPERTY_LABEL, "Commissions et frais sur émission d'emprunts"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "442", Account.PROPERTY_LABEL, "Frais sur effets (commissions d'endos...)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "443", Account.PROPERTY_LABEL, "Participation des employeurs à l'effort de construction"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "444", Account.PROPERTY_LABEL, "Contribution sociale de solidarité à la charge des sociétés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445", Account.PROPERTY_LABEL, "Congés payes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "446", Account.PROPERTY_LABEL, "Indemnités et avantages divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "447", Account.PROPERTY_LABEL, "Cotisations à l'URSSAF"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "451", Account.PROPERTY_LABEL, "Cotisations aux caisses de retraites"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "455", Account.PROPERTY_LABEL, "Cotisations aux ASSEDIC"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "456", Account.PROPERTY_LABEL, "Intérêts des emprunts et dettes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "457", Account.PROPERTY_LABEL, "Intérêts des comptes courants et des dépôts créditeurs"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "458", Account.PROPERTY_LABEL, "Intérêts bancaires et sur opérations de financement (escompt"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "462", Account.PROPERTY_LABEL, "Intérêts des obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "464", Account.PROPERTY_LABEL, "Pertes de change ou de conversion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "465", Account.PROPERTY_LABEL, "Dotations aux amortissements sur immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "467", Account.PROPERTY_LABEL, "Dotations aux amortissements des charges d'exploitation à ré"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "468", Account.PROPERTY_LABEL, "Dotations aux provisions pour risques et charges d'exploitat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "470", Account.PROPERTY_LABEL, "Dotations aux amortissements des primes de remboursement des"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "476", Account.PROPERTY_LABEL, "Dotation aux provisions pour dépréciation des éléments finan"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "477", Account.PROPERTY_LABEL, "Dotations aux amortissements exceptionnels sur immobilisatio"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "478", Account.PROPERTY_LABEL, "Ports et frais accessoires factures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "481", Account.PROPERTY_LABEL, "Bonis sur reprises d'emballages consignes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "486", Account.PROPERTY_LABEL, "Autres produits activités annexes (cessions d'approvisionnem"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "487", Account.PROPERTY_LABEL, "Variation des en-cours de production de biens"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "488", Account.PROPERTY_LABEL, "Variation des en-cours de production de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "491", Account.PROPERTY_LABEL, "Variation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "495", Account.PROPERTY_LABEL, "Gains de change ou de conversion"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "496", Account.PROPERTY_LABEL, "Reprises sur provisions pour dépréciation des éléments finan"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "501", Account.PROPERTY_LABEL, "Sur emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "502", Account.PROPERTY_LABEL, "TVA à décaisser"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "503", Account.PROPERTY_LABEL, "TVA sur immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "504", Account.PROPERTY_LABEL, "TVA sur autres bien et services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "505", Account.PROPERTY_LABEL, "Crédit de TVA à reporter"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "506", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "507", Account.PROPERTY_LABEL, "TVA collectée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "508", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "509", Account.PROPERTY_LABEL, "Remboursement de taxes sur le chiffre d'affaires demandé"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "511", Account.PROPERTY_LABEL, "TVA récupérée d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "512", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures non parvenues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "514", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures à établir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "515", Account.PROPERTY_LABEL, "Achats stockés - Matières premières France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "516", Account.PROPERTY_LABEL, "Achats stockés - Matières premières CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "517", Account.PROPERTY_LABEL, "Frais accessoires d'achat France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "518", Account.PROPERTY_LABEL, "Frais accessoires d'achat CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "519", Account.PROPERTY_LABEL, "Dotations aux amort. immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "530", Account.PROPERTY_LABEL, "Dotations provisions dépréc. immos incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "540", Account.PROPERTY_LABEL, "Dotations provisions dépréc. immos corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "580", Account.PROPERTY_LABEL, "Stocks et en-cours"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "590", Account.PROPERTY_LABEL, "Créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "601", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "602", Account.PROPERTY_LABEL, "Ventes de produits finis France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "603", Account.PROPERTY_LABEL, "Ventes de produits finis CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "604", Account.PROPERTY_LABEL, "Prestations de services France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "605", Account.PROPERTY_LABEL, "Prestations de services CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "606", Account.PROPERTY_LABEL, "Ventes de marchandises France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "607", Account.PROPERTY_LABEL, "Ventes de marchandises CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "608", Account.PROPERTY_LABEL, "Compte créé pendant import"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "609", Account.PROPERTY_LABEL, "Reprises prov. dépréc. immos incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "611", Account.PROPERTY_LABEL, "Reprises prov. dépréc. immos corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "612", Account.PROPERTY_LABEL, "Stocks et en-cours"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "613", Account.PROPERTY_LABEL, "Créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "614", Account.PROPERTY_LABEL, "Reprises sur provisions - Amort. dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "615", Account.PROPERTY_LABEL, "achat cee"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "616", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "617", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "618", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "619", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "621", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "622", Account.PROPERTY_LABEL, "TVA sur autres bien et services 19.6 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "623", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "624", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "625", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "626", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "627", Account.PROPERTY_LABEL, "TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "628", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "629", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Débit CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "631", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "633", Account.PROPERTY_LABEL, "TVA Collectée 19.6 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "635", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Encais. France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "637", Account.PROPERTY_LABEL, "TVA Collectée 5.5 Encais. CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "641", Account.PROPERTY_LABEL, "Capital"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "644", Account.PROPERTY_LABEL, "Capital non amorti"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "645", Account.PROPERTY_LABEL, "Ecarts de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "646", Account.PROPERTY_LABEL, "Réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "647", Account.PROPERTY_LABEL, "réserve légale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "648", Account.PROPERTY_LABEL, "Réserves indisponibles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "651", Account.PROPERTY_LABEL, "Réserves statutaires ou contractuelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "653", Account.PROPERTY_LABEL, "Réserves réglementes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "654", Account.PROPERTY_LABEL, "Autres réserves"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "655", Account.PROPERTY_LABEL, "Compte de l'exploitant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "658", Account.PROPERTY_LABEL, "report a nouveau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "661", Account.PROPERTY_LABEL, "Résultat de l'exercice (bénéfice)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "664", Account.PROPERTY_LABEL, "Résultat de l'exercice (perte)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "665", Account.PROPERTY_LABEL, "Amortissements dérogatoires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "667", Account.PROPERTY_LABEL, "Provision spéciale de réévaluation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "668", Account.PROPERTY_LABEL, "Plus-values réinvesties"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "671", Account.PROPERTY_LABEL, "Autres provisions réglementées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "672", Account.PROPERTY_LABEL, "Provisions pour risques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "675", Account.PROPERTY_LABEL, "Provision pour litige"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "678", Account.PROPERTY_LABEL, "Provisions pour charges sociales et fiscales sur congés à pa"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "681", Account.PROPERTY_LABEL, "Autres emprunts obligataires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "686", Account.PROPERTY_LABEL, "Emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "687", Account.PROPERTY_LABEL, "Sur emprunts auprès des établissements de crédit"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "691", Account.PROPERTY_LABEL, "Primes de remboursement des obligations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "695", Account.PROPERTY_LABEL, "Dettes rattachées a des participations (groupe)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "696", Account.PROPERTY_LABEL, "Frais détablissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "697", Account.PROPERTY_LABEL, "Frais de recherche et de développement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "698", Account.PROPERTY_LABEL, "Concessions et droits similaires; brevets; licences; marques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "699", Account.PROPERTY_LABEL, "Droit au bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "701", Account.PROPERTY_LABEL, "Fonds commercial"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "702", Account.PROPERTY_LABEL, "Autres immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "703", Account.PROPERTY_LABEL, "Matériel industriel (1)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "704", Account.PROPERTY_LABEL, "Matériel de transport"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "705", Account.PROPERTY_LABEL, "Matériel de bureau et matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "706", Account.PROPERTY_LABEL, "MATERIEL INFORMATIQUE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "707", Account.PROPERTY_LABEL, "Autres titres"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "708", Account.PROPERTY_LABEL, "PRET AUX SALARIES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "709", Account.PROPERTY_LABEL, "Dépôts et cautionnements versés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "713", Account.PROPERTY_LABEL, "Créances sur Titres Immo."); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "721", Account.PROPERTY_LABEL, "Amortissements des immobilisations incorporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "722", Account.PROPERTY_LABEL, "Frais établissement (même ventilation que celle du compte 20"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "740", Account.PROPERTY_LABEL, "Amortissements des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "751", Account.PROPERTY_LABEL, "Constructions même ventilation que celle du compte 213)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "752", Account.PROPERTY_LABEL, "Installations techniques; matériel et outillage industriels"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "753", Account.PROPERTY_LABEL, "AMORTISSEMENT MATERIEL"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "754", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations incorporell"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "755", Account.PROPERTY_LABEL, "Provisions pour dépréciation des immobilisations corporelles"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "758", Account.PROPERTY_LABEL, "Provisions pour dépréciation des participations et créances"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "761", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres immobilisations fina"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "762", Account.PROPERTY_LABEL, "Provisions pour dépréciation des matières premières (et four"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "763", Account.PROPERTY_LABEL, "Provisions pour dépréciation des autres approvisionnements"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "764", Account.PROPERTY_LABEL, "Provisions pour dépréciation des encours de production de bi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "765", Account.PROPERTY_LABEL, "Provisions pour dépréciation des en-cours de production de s"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "766", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de produits"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "767", Account.PROPERTY_LABEL, "Provisions pour dépréciation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "768", Account.PROPERTY_LABEL, "Fournisseurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "771", Account.PROPERTY_LABEL, "NF Poussin Benjamin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "772", Account.PROPERTY_LABEL, "NF Thimel Arnaud"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "775", Account.PROPERTY_LABEL, "NF Ruchaud Julien"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "777", Account.PROPERTY_LABEL, "Mutuelle du Mans"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "778", Account.PROPERTY_LABEL, "SFR"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "781", Account.PROPERTY_LABEL, "Free Telecom"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "786", Account.PROPERTY_LABEL, "April"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "787", Account.PROPERTY_LABEL, "CM-CIC Epargne Salariale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "791", Account.PROPERTY_LABEL, "ECAC -Troadec"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "796", Account.PROPERTY_LABEL, "Fournisseurs facture à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "801", Account.PROPERTY_LABEL, "Facture à Emettre"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "802", Account.PROPERTY_LABEL, "Personnel - Rémunérations dues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "809", Account.PROPERTY_LABEL, "Regul Mutuelle à recupérer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "890", Account.PROPERTY_LABEL, "Personnel - Charges à payer et produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "891", Account.PROPERTY_LABEL, "Dettes provisionnées pour congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1061", Account.PROPERTY_LABEL, "Intéressement à verser aux salariés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1062", Account.PROPERTY_LABEL, "Personnel -autres charges a payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1063", Account.PROPERTY_LABEL, "Urssaf"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1064", Account.PROPERTY_LABEL, "Urssaf-csg-crds-forfait social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1068", Account.PROPERTY_LABEL, "retraite"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1391", Account.PROPERTY_LABEL, "Pôle Emploi"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1398", Account.PROPERTY_LABEL, "Retraite ARRCO"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1671", Account.PROPERTY_LABEL, "Retraite Cadre AGIRC"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1674", Account.PROPERTY_LABEL, "Mutuelle"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "1675", Account.PROPERTY_LABEL, "Prévoyance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2761", Account.PROPERTY_LABEL, "charges sociales sur congés à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2768", Account.PROPERTY_LABEL, "Autres charges à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2801", Account.PROPERTY_LABEL, "URSSAF à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2803", Account.PROPERTY_LABEL, "Subventions d'expoitation"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2805", Account.PROPERTY_LABEL, "Etat - Impôts sur les bénéfices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2807", Account.PROPERTY_LABEL, "Crédit Impot Recherche à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2808", Account.PROPERTY_LABEL, "IS à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2811", Account.PROPERTY_LABEL, "Crédit Impot Recherche à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2812", Account.PROPERTY_LABEL, "Crédit Impot Intéressement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2813", Account.PROPERTY_LABEL, "Etat - Taxes sur le chiffre d'affaires"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2814", Account.PROPERTY_LABEL, "TVA à décaisser"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2815", Account.PROPERTY_LABEL, "TVA à décaisser 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2818", Account.PROPERTY_LABEL, "TVA sur immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2905", Account.PROPERTY_LABEL, "TVA sur immobilisations 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2906", Account.PROPERTY_LABEL, "TVA sur autres bien et services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2907", Account.PROPERTY_LABEL, "TVA/ABS 2;1%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2908", Account.PROPERTY_LABEL, "TVA sur autres bien et services 5.5 Débit France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2911", Account.PROPERTY_LABEL, "TVA sur autres biens et services 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2931", Account.PROPERTY_LABEL, "Crédit de TVA à reporter"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2932", Account.PROPERTY_LABEL, "Crédit de TVA à reporter 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2961", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2966", Account.PROPERTY_LABEL, "TVA collectée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2967", Account.PROPERTY_LABEL, "TVA Collectée 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2968", Account.PROPERTY_LABEL, "TVA encaissée"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2971", Account.PROPERTY_LABEL, "TVA encaissée 20%"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2972", Account.PROPERTY_LABEL, "Taxes assimilées à la TVA"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2973", Account.PROPERTY_LABEL, "TVA A REGUL"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2974", Account.PROPERTY_LABEL, "Remboursement de taxes sur le chiffre d'affaires demandé"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2975", Account.PROPERTY_LABEL, "TVA récupérée d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "2976", Account.PROPERTY_LABEL, "Taxes sur le chif d'af sur factures non parvenues"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4081", Account.PROPERTY_LABEL, "Taxes sur le chiffre d'affaires sur factures à établir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4084", Account.PROPERTY_LABEL, "Obligations cautionnées"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4088", Account.PROPERTY_LABEL, "Autres TVA à déduire"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4091", Account.PROPERTY_LABEL, "Autres impôts; taxes et versements assimilés"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4096", Account.PROPERTY_LABEL, "ETAT CHARGES A PAYER"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4097", Account.PROPERTY_LABEL, "Etat charges a payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4098", Account.PROPERTY_LABEL, "TAXE PRO"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4191", Account.PROPERTY_LABEL, "Etat charges à payer formation prof"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4196", Account.PROPERTY_LABEL, "Impôt dégrevements à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4197", Account.PROPERTY_LABEL, "Associés - Comptes courants"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4198", Account.PROPERTY_LABEL, "compte REGNIER"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4282", Account.PROPERTY_LABEL, "compte POUSSIN"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4284", Account.PROPERTY_LABEL, "compte PINEAU"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4286", Account.PROPERTY_LABEL, "Créances sur cessions d'immobilisations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4287", Account.PROPERTY_LABEL, "Subvention Oseo à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4452", Account.PROPERTY_LABEL, "Débiteurs et crediteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4455", Account.PROPERTY_LABEL, "Produits à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4456", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4457", Account.PROPERTY_LABEL, "Compte d'attente"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4458", Account.PROPERTY_LABEL, "Charges à repartir sur plusieurs exercices"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4686", Account.PROPERTY_LABEL, "Charges constatées d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "4687", Account.PROPERTY_LABEL, "Produits constatés d'avance"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5111", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de clients"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5112", Account.PROPERTY_LABEL, "Provisions pour dépréciation des comptes de débiteurs divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5113", Account.PROPERTY_LABEL, "VMP - Actions"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5114", Account.PROPERTY_LABEL, "CAT Tonic 60"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5121", Account.PROPERTY_LABEL, "Valeurs à I'encaissement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "5122", Account.PROPERTY_LABEL, "Banques"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6022", Account.PROPERTY_LABEL, "CAT TONIC 60"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6026", Account.PROPERTY_LABEL, "Autres organismes financiers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6031", Account.PROPERTY_LABEL, "Intérêts courus à payer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6032", Account.PROPERTY_LABEL, "Concours bancaires courant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6091", Account.PROPERTY_LABEL, "Crédit de mobilisation de créances commerciales (CMCC)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6092", Account.PROPERTY_LABEL, "Mobilisation de créances nées à létranger"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6094", Account.PROPERTY_LABEL, "TONIC 60- Intérets courus à recevoir"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6095", Account.PROPERTY_LABEL, "Caisse siège social"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6096", Account.PROPERTY_LABEL, "Virements internes"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6097", Account.PROPERTY_LABEL, "Provisions pour dépréciation des valeurs mobilières de place"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6098", Account.PROPERTY_LABEL, "Achats stockés - Matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6371", Account.PROPERTY_LABEL, "ACHATS MATERIELS INFORMATIQUES"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6411", Account.PROPERTY_LABEL, "Achats stockés - Matières premières France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6412", Account.PROPERTY_LABEL, "Achats stockés - Matières premières CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6413", Account.PROPERTY_LABEL, "Fournitures consommables"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6414", Account.PROPERTY_LABEL, "achat carburant"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6451", Account.PROPERTY_LABEL, "Fourniture de magasin"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6452", Account.PROPERTY_LABEL, "Fourniture de bureau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6453", Account.PROPERTY_LABEL, "Frais postaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6454", Account.PROPERTY_LABEL, "Emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "6688", Account.PROPERTY_LABEL, "VARIATION DES STOCKS (approvisionnements et marchandises)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7133", Account.PROPERTY_LABEL, "Variation des stocks de matières premières (et fournitures)"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7134", Account.PROPERTY_LABEL, "Variation des stocks de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7135", Account.PROPERTY_LABEL, "Prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "7688", Account.PROPERTY_LABEL, "achat matériel informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27682", Account.PROPERTY_LABEL, "Achats non stockes de matières et fournitures"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27684", Account.PROPERTY_LABEL, "éléctricité"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27685", Account.PROPERTY_LABEL, "gaz"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "27688", Account.PROPERTY_LABEL, "Repas"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44551", Account.PROPERTY_LABEL, "Petit équipement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44562", Account.PROPERTY_LABEL, "frais d'aménagement"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44566", Account.PROPERTY_LABEL, "Fournitures de bureau"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44567", Account.PROPERTY_LABEL, "CARBURANTS"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44571", Account.PROPERTY_LABEL, "Achats de marchandises"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44583", Account.PROPERTY_LABEL, "achats divers"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44584", Account.PROPERTY_LABEL, "Achats de marchandises France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44586", Account.PROPERTY_LABEL, "Achats de marchandises CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "44587", Account.PROPERTY_LABEL, "Frais accessoires d'achat"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68111", Account.PROPERTY_LABEL, "Frais accessoires d'achat France"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68112", Account.PROPERTY_LABEL, "Frais accessoires d'achat CEE"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68161", Account.PROPERTY_LABEL, "Rabais; remises et ristournes obtenus sur achats"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68162", Account.PROPERTY_LABEL, "RRR sur prestations de services"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "68725", Account.PROPERTY_LABEL, "Sous-traitance générale"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78161", Account.PROPERTY_LABEL, "Redevances de crédit-bail"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78162", Account.PROPERTY_LABEL, "Locations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "78725", Account.PROPERTY_LABEL, "loyer"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445661", Account.PROPERTY_LABEL, "Location informatique"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445662", Account.PROPERTY_LABEL, "location mobilière"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445664", Account.PROPERTY_LABEL, "Malis sur emballages"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445665", Account.PROPERTY_LABEL, "Charges locatives et de copropriété"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445711", Account.PROPERTY_LABEL, "Entretien et réparations"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445712", Account.PROPERTY_LABEL, "Entretien et réparations sur biens immo"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445714", Account.PROPERTY_LABEL, "entretien locaux"); + accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "445715", Account.PROPERTY_LABEL, "Primes d'assurance"); + tcontext.commit(); + } + +} diff --git a/lima-swing/src/test/java/org/chorem/lima/ui/LimaTestsConfig.java b/lima-swing/src/test/java/org/chorem/lima/ui/LimaTestsConfig.java new file mode 100644 index 0000000..15c942a --- /dev/null +++ b/lima-swing/src/test/java/org/chorem/lima/ui/LimaTestsConfig.java @@ -0,0 +1,71 @@ +package org.chorem.lima.ui; + +/* + * #%L + * Lima :: business + * %% + * 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 com.google.common.collect.Maps; +import org.chorem.lima.business.LimaServiceConfig; +import org.chorem.lima.entity.LimaCallaoEntityEnum; +import org.nuiton.config.ApplicationConfig; +import org.nuiton.topia.flyway.TopiaFlywayService; +import org.nuiton.topia.flyway.TopiaFlywayServiceImpl; +import org.nuiton.topia.persistence.TopiaConfigurationConstants; + +import java.util.Map; +import java.util.Properties; + +/** + * Created by davidcosse on 11/06/14. + */ +public class LimaTestsConfig { + + public LimaTestsConfig(String configFileName, Properties limaTestConfig) { + LimaServiceConfig instance = LimaServiceConfig.getInstance(configFileName); + Properties standardLimaConfig = instance.getConfig().getFlatOptions(); + + for (Map.Entry<Object, Object> entry : limaTestConfig.entrySet()) { + standardLimaConfig.setProperty((String)entry.getKey(),(String)entry.getValue()); + } + ApplicationConfig testConfig = new ApplicationConfig(standardLimaConfig); + instance.setConfig(testConfig); + setRootContextProperties(instance); + } + + protected void setRootContextProperties(LimaServiceConfig instance) { + Properties result = instance.getFlatOptions(); + // add persistence classes from generated code + result.setProperty(TopiaConfigurationConstants.CONFIG_PERSISTENCE_CLASSES, LimaCallaoEntityEnum.getImplementationClassesAsString()); + + Map<String, String> toAddIfNotPresent = Maps.newLinkedHashMap(); + toAddIfNotPresent.put("topia.service.migration", TopiaFlywayServiceImpl.class.getName()); + toAddIfNotPresent.put("topia.service.migration." + TopiaFlywayService.USE_MODEL_VERSION, "true"); + toAddIfNotPresent.put(TopiaConfigurationConstants.CONFIG_PERSISTENCE_INIT_SCHEMA, "true"); + + for (Map.Entry<String, String> entry : toAddIfNotPresent.entrySet()) { + if (!result.containsKey(entry.getKey())) { + result.setProperty(entry.getKey(), entry.getValue()); + } + } + instance.setRootContextProperties(result); + } + +} diff --git a/lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java b/lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java new file mode 100644 index 0000000..0c9936d --- /dev/null +++ b/lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java @@ -0,0 +1,56 @@ +package org.chorem.lima.ui.report; + +/* + * #%L + * Lima :: Swing + * %% + * Copyright (C) 2008 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import net.sf.jasperreports.engine.JRException; +import org.chorem.lima.ui.AbstractLimaTest; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; + +/** + * Created by davidcosse on 02/10/14. + */ +public class ReportTest extends AbstractLimaTest{ + + String tmpDir; + + @Before + public void initTest() throws Exception { + initTestDefaultAccounts(); + tmpDir = System.getProperty("java.io.tmpdir")+"/"; + } + + @Test + public void testAccountReport() throws JRException, IOException { + ReportBuilder builder = new ReportBuilder(); + builder.generateAccountReport(tmpDir + "AccountReport.pdf"); + } + + @Test + public void testBalanceReport() throws JRException, IOException { + ReportBuilder builder = new ReportBuilder(); + builder.generateBalanceReport(tmpDir + "BalanceReport.pdf"); + } +} diff --git a/pom.xml b/pom.xml index ad2b56b..0bef794 100644 --- a/pom.xml +++ b/pom.xml @@ -201,6 +201,7 @@ <pdfboxVersion>1.8.6</pdfboxVersion> <jbossTransactionVersion>1.0.0.Final</jbossTransactionVersion> <commonsCodecVersion>1.9</commonsCodecVersion> + <jasperreportsVersion>5.6.1</jasperreportsVersion> <!-- license to use --> <license.licenseName>gpl_v3</license.licenseName> @@ -553,6 +554,12 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + <version>${jasperreportsVersion}</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 feature/newReportBuilder in repository lima. See http://git.chorem.org/lima.git commit 5e5d8f200e878d145bb0a6d77743d2a3a8cfe50f Author: dcosse <japbiw74> Date: Thu Nov 6 15:50:18 2014 +0100 refs #769 création d'un nouveau module pour la partie web de lima et création du rapport balance avec jasper report --- .../chorem/lima/business/api/AccountService.java | 1 + .../api/ClosedPeriodicEntryBookService.java | 5 + .../chorem/lima/business/api/DocumentService.java | 5 + .../org/chorem/lima/business/api/EntryService.java | 7 + .../lima/business/api/HttpServerService.java | 31 - .../chorem/lima/business/api/ReportService.java | 2 +- .../api/report/BalanceBeanReportService.java | 21 + lima-business/pom.xml | 23 + .../jasperreports/accounts/AccountReport.jrxml | 0 .../main/jasperreports/balance/BalanceReport.jrxml | 347 +++++++++++ .../balance/BalanceReportAccountReport.jrxml | 132 ++++ .../balance/BalanceSubAccountsReport.jrxml | 109 ++++ .../lima/business/ejb/AccountServiceImpl.java | 9 + .../ejb/ClosedPeriodicEntryBookServiceImpl.java | 16 +- .../chorem/lima/business/ejb/EntryServiceImpl.java | 22 + .../ejb/report/BalanceBeanReportServiceImpl.java | 195 ++++++ .../java/org/chorem/lima/service/package-info.java | 27 - .../lima/beans/BalanceReportAccountImpl.java | 41 ++ .../java/org/chorem/lima/entity/EntryTopiaDao.java | 2 +- lima-callao/src/main/xmi/accounting-model.zargo | Bin 48221 -> 48316 bytes lima-swing/pom.xml | 30 +- lima-swing/src/main/filters/pom.properties | 6 +- .../main/jasperreports/balance/BalanceReport.jrxml | 292 --------- .../balance/BalanceReportAccountReport.jrxml | 126 ---- .../balance/BalanceSubAccountsReport.jrxml | 107 ---- .../src/main/java/org/chorem/lima/LimaMain.java | 18 +- .../java/org/chorem/lima/ui/MainViewHandler.java | 5 +- .../lima/ui/lettering/LetteringViewHandler.java | 2 +- .../org/chorem/lima/ui/report/ReportBuilder.java | 107 ---- .../org/chorem/lima/ui/report/ReportFactory.java | 148 ----- .../dataSource/AccountCustomDataSourceFabric.java | 137 ----- .../dataSource/BalanceCustomDataSourceFabric.java | 147 ----- lima-web/LICENSE.txt | 674 +++++++++++++++++++++ lima-web/README.txt | 20 + {lima-business => lima-web}/pom.xml | 108 ++-- lima-web/src/main/assembly/bin.xml | 67 ++ lima-web/src/main/assembly/lima-server | 9 + .../jasperreports/accounts/AccountReport.jrxml | 0 .../main/jasperreports/balance/BalanceReport.jrxml | 347 +++++++++++ .../balance/BalanceReportAccountReport.jrxml | 132 ++++ .../balance/BalanceSubAccountsReport.jrxml | 109 ++++ .../src/main/java/org/chorem/lima/LimaServer.java | 75 +++ .../chorem/lima/web/action/DocumentService.java | 121 ++-- .../web/action/balance/BalanceReportBuilder.java | 60 ++ .../chorem/lima/web/service/HttpServerService.java | 60 +- .../org/chorem/lima/web/utils/DocumentsEnum.java | 67 ++ .../org/chorem/lima/web/action}/ReportTest.java | 32 +- pom.xml | 5 +- 48 files changed, 2657 insertions(+), 1349 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 41e123c..6e1badf 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,5 @@ public interface AccountService { List<Account> stringToListAccounts(String selectedAccounts); + Account findAccountById(String accountId); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java index 09a8766..64bbed9 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/ClosedPeriodicEntryBookService.java @@ -26,10 +26,15 @@ import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FinancialPeriod; +import java.util.Date; +import java.util.List; + /** * Created by davidcosse on 17/01/14. */ public interface ClosedPeriodicEntryBookService { ClosedPeriodicEntryBook getByEntryBookAndFinancialPeriod(EntryBook entryBook, FinancialPeriod financialPeriod); + + List<ClosedPeriodicEntryBook> getAllByDates(Date beginDate, Date endDate); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java index 2abf0a2..f090da5 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java @@ -22,6 +22,8 @@ package org.chorem.lima.business.api; +import org.chorem.lima.beans.BalanceReport; + import java.util.Date; /** @@ -45,4 +47,7 @@ public interface DocumentService { void createVatDocuments(Date beginDate, Date endDate, String autocomplete); String createAccountDocument(Date beginDate, Date endDate, String account); + + BalanceReport buildGeneralEntryBooksDocuments(Date beginDate, + Date endDate); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java index e0c08cc..1925c8b 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryService.java @@ -22,12 +22,19 @@ package org.chorem.lima.business.api; * #L% */ +import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.Entry; +import java.util.List; + /** * Created by davidcosse on 17/01/14. */ public interface EntryService { Entry createEntry(Entry entry); + + List<Entry> findAllEntryByDateForEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook); + + List<Object[]> findDebitCreditOfTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java deleted file mode 100644 index 4a09027..0000000 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * #%L - * Lima :: business API - * %% - * Copyright (C) 2008 - 2010 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% - */ - -package org.chorem.lima.business.api; - -public interface HttpServerService { - - void start(); - - int getHttpPort(); - -} diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java index 6a8b9cf..dbfb93f 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java @@ -37,7 +37,7 @@ import java.util.List; * <p/> * Actuellement: * <ul> - * <li>Balance</li> + * <li>balance</li> * <li>Bilan</li> * <li>TVA</li> * </ul> diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceBeanReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceBeanReportService.java new file mode 100644 index 0000000..c94f9d6 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceBeanReportService.java @@ -0,0 +1,21 @@ +package org.chorem.lima.business.api.report; + +import org.chorem.lima.beans.BalanceReport; + +import java.util.Date; + +/** + * Created by davidcosse on 06/11/14. + */ +public interface BalanceBeanReportService { + + /** + * Generate the necessary beans to make balance report. + * + * @param from from date + * @param to to date + * @param selectedAccounts if null all accounts will be selected + * @return the balance beans + */ + BalanceReport generateBalanceReportDocument(Date from, Date to, String selectedAccounts); +} diff --git a/lima-business/pom.xml b/lima-business/pom.xml index 2b6774e..ab0714e 100644 --- a/lima-business/pom.xml +++ b/lima-business/pom.xml @@ -125,6 +125,11 @@ <artifactId>commons-codec</artifactId> </dependency> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + </dependencies> <build> @@ -146,6 +151,24 @@ <pluginManagement> <plugins> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jasperreports-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>compile-reports</goal> + </goals> + </execution> + </executions> + <dependencies> + <!--note this must be repeated here to pick up correct xml validation --> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + </dependencies> + </plugin> + <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> diff --git a/lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml b/lima-business/src/main/jasperreports/accounts/AccountReport.jrxml similarity index 100% copy from lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml copy to lima-business/src/main/jasperreports/accounts/AccountReport.jrxml diff --git a/lima-business/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-business/src/main/jasperreports/balance/BalanceReport.jrxml new file mode 100644 index 0000000..a0339b9 --- /dev/null +++ b/lima-business/src/main/jasperreports/balance/BalanceReport.jrxml @@ -0,0 +1,347 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T17:37:18 --> +<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" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="66929b65-d52d-4e6b-8d8e-8bd4ef5ac821"> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" fontSize="12" isBold="true"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="fromDate" class="java.util.Date"/> + <field name="toDate" class="java.util.Date"/> + <field name="currency" class="java.lang.String"/> + <field name="fromAccount" class="java.lang.String"/> + <field name="toAccount" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="balanceReportAccountPath" class="java.lang.String"/> + <field name="companyName" class="java.lang.String"/> + <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> + </variable> + <group name="accounts"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="41" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textField pattern="dd/MM/yyyy"> + <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 verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromDate}]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="e7bf1b4c-d748-4c99-b9e2-838903711b48"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true" pdfFontName="Times-Roman"/> + </textElement> + <text><![CDATA[Balance]]></text> + </staticText> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement style="Default" x="480" y="0" width="98" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default" x="422" y="0" width="58" height="20" forecolor="#736343" uuid="ddf50f55-7669-44be-b427-d03bc72cc264"/> + <textElement textAlignment="Center" verticalAlignment="Middle"/> + <text><![CDATA[Edition du:]]></text> + </staticText> + <staticText> + <reportElement style="Default" x="190" y="20" width="20" height="20" forecolor="#736343" uuid="08282b18-8e67-4bcb-878e-ac97dc0bbc5b"> + <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> + <text><![CDATA[Du]]></text> + </staticText> + <staticText> + <reportElement style="Default" x="290" y="20" width="20" height="20" forecolor="#736343" uuid="e149a451-2c1c-4d8d-9b01-85e35144eb86"> + <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> + <text><![CDATA[au]]></text> + </staticText> + <textField pattern="dd/MM/yyyy"> + <reportElement style="Default" x="310" 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[$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 isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="25" splitType="Stretch"> + <staticText> + <reportElement style="Default oblique" x="0" y="9" width="42" height="16" uuid="33ba6496-bc27-466f-9764-7336b6741c13"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <text><![CDATA[Comptes :]]></text> + </staticText> + <textField isBlankWhenNull="true"> + <reportElement style="Default oblique" x="42" y="9" width="402" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromAccount}]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default oblique" x="444" y="9" width="30" height="16" forecolor="#000000" uuid="02207af8-5ccd-43c9-b475-acb534bcd6cf"> + <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 size="8"/> + </textElement> + <text><![CDATA[Devise:]]></text> + </staticText> + <textField> + <reportElement style="Default oblique" x="474" y="9" width="104" 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="Left" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$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" 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Compte]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Intitulé]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Total Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Solde Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="20" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceReportAccountPath})]]></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"/> + <textField> + <reportElement x="295" y="0" width="50" height="10" uuid="bbf610ed-68ca-4ff7-992a-b894a61b2379"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_COUNT}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="235" y="0" width="50" height="10" uuid="7f4c8e82-7fe3-4207-ab07-1a8c4d977a94"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="285" y="0" width="10" height="10" uuid="2609dfd4-556d-4dbd-8d23-74474c5b344c"> + <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 textAlignment="Center"> + <font size="8"/> + </textElement> + <text><![CDATA[/]]></text> + </staticText> + </band> + </pageFooter> +</jasperReport> diff --git a/lima-business/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-business/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml new file mode 100644 index 0000000..e16efa2 --- /dev/null +++ b/lima-business/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T15:21: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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <field name="subAccounts" class="java.util.List"/> + <field name="balanceSubAccountsReportPath" class="java.lang.String"/> + <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> + </subreport> + </band> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="1"> + <line> + <reportElement style="Default" x="0" y="0" width="578" height="1" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> + </line> + </band> + </columnFooter> +</jasperReport> diff --git a/lima-business/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-business/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml new file mode 100644 index 0000000..b6fb933 --- /dev/null +++ b/lima-business/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T15:21:33 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> +</jasperReport> 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 99a6776..f31c240 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 @@ -294,4 +294,13 @@ public class AccountServiceImpl extends AbstractLimaService implements AccountSe } return new ArrayList<Account>(accounts); } + + @Override + public Account findAccountById(String accountId) { + + AccountTopiaDao accountDao = getDaoHelper().getAccountDao(); + Account account = accountDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + + return account; + } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java index 5dd7a13..30a7cb6 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ClosedPeriodicEntryBookServiceImpl.java @@ -31,6 +31,8 @@ import org.chorem.lima.entity.FinancialPeriod; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; +import java.util.Date; +import java.util.List; /** * Created by davidcosse on 17/01/14. @@ -39,12 +41,22 @@ import javax.ejb.TransactionAttribute; @Remote(ClosedPeriodicEntryBookService.class) @TransactionAttribute public class ClosedPeriodicEntryBookServiceImpl extends AbstractLimaService implements ClosedPeriodicEntryBookService { + + @Override public ClosedPeriodicEntryBook getByEntryBookAndFinancialPeriod(EntryBook entryBook, FinancialPeriod financialPeriod) { + ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao = getDaoHelper().getClosedPeriodicEntryBookDao(); + ClosedPeriodicEntryBook result = closedPeriodicEntryBookTopiaDao.findByEntryBookAndFinancialPeriod(entryBook, financialPeriod); - ClosedPeriodicEntryBookTopiaDao accountTopiaDao = getDaoHelper().getClosedPeriodicEntryBookDao(); - ClosedPeriodicEntryBook result = accountTopiaDao.findByEntryBookAndFinancialPeriod(entryBook, financialPeriod); + return result; + } + @Override + public List<ClosedPeriodicEntryBook> getAllByDates(Date beginDate, Date endDate) { + ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao = getDaoHelper().getClosedPeriodicEntryBookDao(); + List<ClosedPeriodicEntryBook> result = + closedPeriodicEntryBookTopiaDao.findAllByDates(beginDate, endDate); return result; } + } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java index 9bcbee0..aac45fb 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryServiceImpl.java @@ -23,12 +23,14 @@ package org.chorem.lima.business.ejb; */ import org.chorem.lima.business.api.EntryService; +import org.chorem.lima.entity.ClosedPeriodicEntryBook; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryTopiaDao; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; +import java.util.List; /** * Created by davidcosse on 17/01/14. @@ -47,4 +49,24 @@ public class EntryServiceImpl extends AbstractLimaService implements EntryServic return result; } + @Override + public List<Entry> findAllEntryByDateForEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) { + EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); + List<Entry> result = entryTopiaDao.findAllEntryByDateForEntryBook(closedPeriodicEntryBook.getEntryBook(), + closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(), + closedPeriodicEntryBook.getFinancialPeriod().getEndDate()); + return result; + } + + @Override + public List<Object[]> findDebitCreditOfTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook) { + EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); + List<Object[]> result = entryTopiaDao.getDebitCreditOfTransaction(closedPeriodicEntryBook.getEntryBook(), + closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(), + closedPeriodicEntryBook.getFinancialPeriod().getEndDate()); + return result; + } + + + } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceBeanReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceBeanReportServiceImpl.java new file mode 100644 index 0000000..d3cf917 --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceBeanReportServiceImpl.java @@ -0,0 +1,195 @@ +package org.chorem.lima.business.ejb.report; + +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; +import org.apache.commons.lang3.StringUtils; +import org.chorem.lima.beans.BalanceReport; +import org.chorem.lima.beans.BalanceReportAccount; +import org.chorem.lima.beans.BalanceReportAccountImpl; +import org.chorem.lima.beans.BalanceReportImpl; +import org.chorem.lima.beans.BalanceTrial; +import org.chorem.lima.beans.BalanceTrialImpl; +import org.chorem.lima.beans.ReportsDatas; +import org.chorem.lima.business.api.AccountService; +import org.chorem.lima.business.api.FinancialPeriodService; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.report.BalanceBeanReportService; +import org.chorem.lima.business.ejb.AbstractLimaService; +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; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.io.File; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +/** + * Created by davidcosse on 04/11/14. + */ +@Stateless +@Remote(BalanceBeanReportService.class) +@TransactionAttribute +public class BalanceBeanReportServiceImpl extends AbstractLimaService implements BalanceBeanReportService { + + @EJB + protected FinancialPeriodService financialPeriodService; + + @EJB + protected AccountService accountService; + + @EJB + protected IdentityService identityService; + + protected static final Integer ACCOUNT_NUMBER_SIZE = 6; + protected static String ROOT_PATH = new File("").getAbsolutePath(); + protected static String BALANCE_REPORT_ACCOUNT_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml"; + protected static String BALANCE_SUB_ACCOUNTS_REPORT_PATH = ROOT_PATH + "/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml"; + + protected static final Predicate<BalanceReportAccount> HAS_NO_ENTRY = new Predicate<BalanceReportAccount>() { + + @Override + public boolean apply(BalanceReportAccount subClasses) { + boolean result = StringUtils.isBlank(subClasses.getAmountDebit()) && + StringUtils.isBlank(subClasses.getAmountCredit()) && + StringUtils.isBlank(subClasses.getSoldeDebit()) && + StringUtils.isBlank(subClasses.getSoldeCredit()); + return result; + } + }; + + @Override + public BalanceReport generateBalanceReportDocument(Date from, Date to, String selectedAccounts) { + BalanceReport result = new BalanceReportImpl(); + + Identity identity = identityService.getIdentity(); + result.setCompanyName(StringUtils.isNotBlank(identity.getName()) ? identity.getName() : ""); + + // TODO DCossé 06/11/14 + String currency = "€"; + + // general info about balance report + result.setCurrency(currency); + result.setFromDate(from); + result.setToDate(to); + result.setBalanceReportAccountPath(BALANCE_REPORT_ACCOUNT_REPORT_PATH); + + + BalanceTrial balanceTrial = new BalanceTrialImpl(); + balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + //for each account create a balance sheet with a ReportsDatas + + 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("")) { + accounts = accountTopiaDao.findAll(); + } + //build list account from selectedAccounts + else { + accounts = accountService.stringToListAccounts(selectedAccounts); + } + + Collection<BalanceReportAccount> returnedAccounts = new ArrayList<>(); + if (accounts != null && !accounts.isEmpty()) { + 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(); + result.setFromAccount(fromAccountLabel + " à " + toAccountLabel); + + HashMap<String, BalanceReportAccountImpl> accountsByClasses = new HashMap<>(); + for (Account account : accounts) { + String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); + + BalanceReportAccountImpl classAccount = accountsByClasses.get(accountClass); + if (classAccount == null) { + classAccount = new BalanceReportAccountImpl(); + classAccount.setBalanceSubAccountsReportPath(BALANCE_SUB_ACCOUNTS_REPORT_PATH); + classAccount.setSubAccounts(new ArrayList<BalanceReportAccount>()); + classAccount.setAccountNumber(""); + classAccount.setLabel("Total " + accountClass); + accountsByClasses.put(accountClass, classAccount); + returnedAccounts.add(classAccount); + } + BalanceReportAccount subClassAccount = bindAccountToBalanceReportAccount(account, from, to); + classAccount.addSubAccount(subClassAccount); + } + } + + Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); + result.addAllAccounts(returnedAccounts); + return result; + } + + /** + * Calculate all credit, debit and solde amounts for the balance + * <p/> + * Get all entries if true + * @throws org.nuiton.topia.persistence.TopiaException + */ + protected BalanceReportAccount bindAccountToBalanceReportAccount(Account account, Date beginDate, Date endDate) { + BalanceReportAccount balanceReportAccount = new BalanceReportAccountImpl(); + String accountNumber = account.getAccountNumber(); + accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); + balanceReportAccount.setAccountNumber(accountNumber); + balanceReportAccount.setLabel(account.getLabel()); + + EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); + + BigDecimal credit = BigDecimal.ZERO; + BigDecimal debit = BigDecimal.ZERO; + BigDecimal solde = BigDecimal.ZERO; + + List<Object[]> results = entryTopiaDao.getDebitCreditOfBalancedTransaction(account, beginDate, endDate); + + int nbAmount = results.size(); + if (nbAmount == 2) { + debit = (BigDecimal) results.get(0)[1]; + credit = (BigDecimal) results.get(1)[1]; + } + if (nbAmount == 1) { + if ((Boolean) results.get(0)[0]) { + debit = (BigDecimal) results.get(0)[1]; + } else { + credit = (BigDecimal) results.get(0)[1]; + } + } + + // set the amounts and solde + //solde = debit - credit + solde = solde.add(debit); + solde = solde.subtract(credit); + + if (solde.compareTo(BigDecimal.ZERO) == 1) { + balanceReportAccount.setSoldeDebit(String.valueOf(solde.abs())); + balanceReportAccount.setSoldeCredit(""); + } else { + balanceReportAccount.setSoldeCredit(solde.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(solde.abs())); + balanceReportAccount.setSoldeDebit(""); + + } + + balanceReportAccount.setAmountCredit(credit.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(credit)); + balanceReportAccount.setAmountDebit(debit.compareTo(BigDecimal.ZERO) == 0 ? "" : String.valueOf(debit)); + + return balanceReportAccount; + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/service/package-info.java b/lima-business/src/main/java/org/chorem/lima/service/package-info.java deleted file mode 100644 index 1b461f0..0000000 --- a/lima-business/src/main/java/org/chorem/lima/service/package-info.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * #%L - * Lima :: business - * %% - * Copyright (C) 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% - */ -/** - * This package defined factory to access for service definied on OpenEJB. - * - * This is a client side package but can be usefull for unit test too. - */ -package org.chorem.lima.service; diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java new file mode 100644 index 0000000..b69f7db --- /dev/null +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceReportAccountImpl.java @@ -0,0 +1,41 @@ +package org.chorem.lima.beans; + + +import org.apache.commons.lang3.StringUtils; + +import java.math.BigDecimal; + +public class BalanceReportAccountImpl extends BalanceReportAccount { + + private static final long serialVersionUID = 1L; + + public void addSubAccount(BalanceReportAccount subAccount) { + + // we only add account that have values + if (StringUtils.isNotBlank(subAccount.getAmountDebit()) && StringUtils.isNotBlank(subAccount.getAmountCredit())) { + getSubAccounts().add(subAccount); + + BigDecimal newAmountDebit = StringUtils.isBlank(this.amountDebit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.amountDebit)); + BigDecimal newAmountCredit = StringUtils.isBlank(this.amountCredit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.amountCredit)); + BigDecimal newSoldeDebit = StringUtils.isBlank(this.soldeDebit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.soldeDebit)); + BigDecimal newSoldeCredit = StringUtils.isBlank(this.soldeCredit) ? BigDecimal.ZERO : BigDecimal.valueOf(Double.parseDouble(this.soldeCredit)); + + if (StringUtils.isNotBlank(subAccount.getAmountDebit())) { + this.amountDebit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getAmountDebit())).add(newAmountDebit)); + } + + if (StringUtils.isNotBlank(subAccount.getAmountCredit())) { + this.amountCredit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getAmountCredit())).add(newAmountCredit)); + } + + if (StringUtils.isNotBlank(subAccount.getSoldeDebit())) { + this.soldeDebit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getSoldeDebit())).add(newSoldeDebit)); + } + if (StringUtils.isNotBlank(subAccount.getSoldeCredit())) { + this.soldeCredit = String.valueOf(BigDecimal.valueOf(Double.parseDouble(subAccount.getSoldeCredit())).add(newSoldeCredit)); + } + } + +// firePropertyChange(PROPERTY_SUB_ACCOUNTS, null, subAccount); + } +} diff --git a/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java b/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java index 9079327..68f3eb6 100644 --- a/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java +++ b/lima-callao/src/main/java/org/chorem/lima/entity/EntryTopiaDao.java @@ -256,7 +256,7 @@ public class EntryTopiaDao extends AbstractEntryTopiaDao<Entry> { } /** - * gat all entries where some field are not filled in. + * get all entries where some field are not filled in. * * @param beginDate begin date * @param endDate end date diff --git a/lima-callao/src/main/xmi/accounting-model.zargo b/lima-callao/src/main/xmi/accounting-model.zargo index 7164628..a308d61 100644 Binary files a/lima-callao/src/main/xmi/accounting-model.zargo and b/lima-callao/src/main/xmi/accounting-model.zargo differ diff --git a/lima-swing/pom.xml b/lima-swing/pom.xml index 5edb383..f2a02f3 100644 --- a/lima-swing/pom.xml +++ b/lima-swing/pom.xml @@ -58,6 +58,12 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> + <artifactId>lima-web</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> <artifactId>lima-callao</artifactId> <version>${project.version}</version> <scope>compile</scope> @@ -175,11 +181,6 @@ <artifactId>commons-lang</artifactId> </dependency> - <dependency> - <groupId>net.sf.jasperreports</groupId> - <artifactId>jasperreports</artifactId> - </dependency> - </dependencies> <build> @@ -204,25 +205,6 @@ <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jasperreports-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>compile-reports</goal> - </goals> - </execution> - </executions> - <dependencies> - <!--note this must be repeated here to pick up correct xml validation --> - <dependency> - <groupId>net.sf.jasperreports</groupId> - <artifactId>jasperreports</artifactId> - </dependency> - </dependencies> - </plugin> - - <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> diff --git a/lima-swing/src/main/filters/pom.properties b/lima-swing/src/main/filters/pom.properties index afdf399..0ab2863 100644 --- a/lima-swing/src/main/filters/pom.properties +++ b/lima-swing/src/main/filters/pom.properties @@ -20,9 +20,9 @@ # #L% ### # mock service -#serviceFactory.impl=org.chorem.lima.service.mock.MockServiceFactory +#serviceFactory.impl=org.chorem.lima.web.service.mock.MockServiceFactory # neogia service -#serviceFactory.impl=org.chorem.lima.service.neogia.NeogiaServiceFactory +#serviceFactory.impl=org.chorem.lima.web.service.neogia.NeogiaServiceFactory # callao implementation -serviceFactory.impl=org.chorem.lima.service.callao.CallaoServiceFactory +serviceFactory.impl=org.chorem.lima.web.service.callao.CallaoServiceFactory encoding=UTF-8 diff --git a/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml deleted file mode 100644 index b26c9fe..0000000 --- a/lima-swing/src/main/jasperreports/balance/BalanceReport.jrxml +++ /dev/null @@ -1,292 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> -<!-- 2014-10-09T13:51:26 --> -<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="66929b65-d52d-4e6b-8d8e-8bd4ef5ac821"> - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="BalanceBeanAdapter"/> - <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="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="fromDate" class="java.util.Date"/> - <field name="toDate" class="java.util.Date"/> - <field name="currency" class="java.lang.String"/> - <field name="fromAccount" class="java.lang.String"/> - <field name="toAccount" class="java.lang.String"/> - <field name="accounts" class="java.util.List"/> - <field name="balanceReportAccountPath" class="java.lang.String"/> - <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> - </variable> - <group name="accounts"/> - <background> - <band splitType="Stretch"/> - </background> - <title> - <band height="74" splitType="Stretch"> - <frame> - <reportElement 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="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textField pattern="dd/MM/yyyy"> - <reportElement 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 verticalAlignment="Middle"> - <font isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{fromDate}]]></textFieldExpression> - </textField> - <staticText> - <reportElement x="0" y="0" width="578" height="20" forecolor="#736343" uuid="e7bf1b4c-d748-4c99-b9e2-838903711b48"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font fontName="DejaVu Sans" size="14" isBold="true" pdfFontName="Times-Roman"/> - </textElement> - <text><![CDATA[Balance]]></text> - </staticText> - <textField pattern="dd/MM/yyyy HH:mm"> - <reportElement x="480" y="0" width="98" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="10" isBold="false"/> - </textElement> - <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> - </textField> - <staticText> - <reportElement x="422" y="0" width="58" height="20" forecolor="#736343" uuid="ddf50f55-7669-44be-b427-d03bc72cc264"/> - <textElement textAlignment="Center" verticalAlignment="Middle"/> - <text><![CDATA[Edition du:]]></text> - </staticText> - <staticText> - <reportElement x="190" y="20" width="20" height="20" forecolor="#736343" uuid="08282b18-8e67-4bcb-878e-ac97dc0bbc5b"> - <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> - <text><![CDATA[Du]]></text> - </staticText> - <staticText> - <reportElement x="290" y="20" width="20" height="20" forecolor="#736343" uuid="e149a451-2c1c-4d8d-9b01-85e35144eb86"> - <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> - <text><![CDATA[au]]></text> - </staticText> - <textField pattern="dd/MM/yyyy"> - <reportElement x="310" 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[$F{toDate}]]></textFieldExpression> - </textField> - </frame> - <staticText> - <reportElement x="0" y="53" width="40" height="20" forecolor="#736343" uuid="02207af8-5ccd-43c9-b475-acb534bcd6cf"/> - <text><![CDATA[Devise:]]></text> - </staticText> - <textField> - <reportElement x="41" y="53" width="100" height="20" forecolor="#736343" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> - <textFieldExpression><![CDATA[$F{currency}]]></textFieldExpression> - </textField> - </band> - </title> - <pageHeader> - <band height="38" splitType="Stretch"> - <staticText> - <reportElement x="0" y="9" width="50" height="16" uuid="33ba6496-bc27-466f-9764-7336b6741c13"/> - <textElement> - <font isItalic="true"/> - </textElement> - <text><![CDATA[Comptes :]]></text> - </staticText> - <staticText> - <reportElement x="100" y="9" width="20" height="16" uuid="cd1272d9-f113-4552-a19f-941ec046265e"/> - <textElement> - <font isItalic="true"/> - </textElement> - <text><![CDATA[à :]]></text> - </staticText> - <textField isBlankWhenNull="true"> - <reportElement x="50" y="9" width="50" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> - <textElement> - <font isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{fromAccount}]]></textFieldExpression> - </textField> - <textField> - <reportElement x="120" y="9" width="80" height="16" uuid="05525266-9965-4412-bef5-eb7dc7b1be42"/> - <textElement> - <font isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{toAccount}]]></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="#F2EBDF" 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="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <staticText> - <reportElement 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"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Compte]]></text> - </staticText> - <staticText> - <reportElement 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"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Intitulé]]></text> - </staticText> - <staticText> - <reportElement 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="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Total Période]]></text> - </staticText> - <staticText> - <reportElement 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"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement 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"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> - <staticText> - <reportElement 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="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Solde Période]]></text> - </staticText> - <staticText> - <reportElement 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"/> - <leftPen lineWidth="0.6"/> - <bottomPen lineWidth="0.6"/> - <rightPen lineWidth="0.6"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Débit]]></text> - </staticText> - <staticText> - <reportElement 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"/> - </box> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <text><![CDATA[Crédit]]></text> - </staticText> - </frame> - </band> - </columnHeader> - <detail> - <band height="21" splitType="Stretch"> - <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceReportAccountPath})]]></subreportExpression> - </subreport> - </band> - </detail> - <pageFooter> - <band height="54" splitType="Stretch"/> - </pageFooter> -</jasperReport> diff --git a/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml deleted file mode 100644 index c2be540..0000000 --- a/lima-swing/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> -<!-- 2014-10-09T13:04: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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> - <property name="com.jaspersoft.studio.unit." value="pixel"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="accountNumber" class="java.lang.String"/> - <field name="label" class="java.lang.String"/> - <field name="amountDebit" class="java.lang.String"/> - <field name="amountCredit" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <field name="subAccounts" class="java.util.List"/> - <field name="balanceSubAccountsReportPath" class="java.lang.String"/> - <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> - <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> - </variable> - <detail> - <band height="10" splitType="Stretch"> - <subreport isUsingCache="false" runToBottom="false"> - <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> - <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> - <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> - </subreport> - </band> - <band height="11" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isBold="true"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8" isBold="true"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </band> - </detail> - <columnFooter> - <band height="1"> - <line> - <reportElement x="0" y="0" width="578" height="1" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> - </line> - </band> - </columnFooter> -</jasperReport> diff --git a/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml deleted file mode 100644 index 53bfca0..0000000 --- a/lima-swing/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 --> -<!-- 2014-10-09T13:05:11 --> -<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> - <property name="com.jaspersoft.studio.unit." value="pixel"/> - <queryString> - <![CDATA[]]> - </queryString> - <field name="accountNumber" class="java.lang.String"/> - <field name="label" class="java.lang.String"/> - <field name="amountDebit" class="java.lang.String"/> - <field name="amountCredit" class="java.lang.String"/> - <field name="soldeDebit" class="java.lang.String"/> - <field name="soldeCredit" class="java.lang.String"/> - <detail> - <band height="10" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> - <property name="local_mesure_unity" value="pixel"/> - </reportElement> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8"/> - <paragraph leftIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font fontName="Courier 10 Pitch" size="8"/> - <paragraph rightIndent="2"/> - </textElement> - <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> - </textField> - </band> - </detail> -</jasperReport> diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java index b83de13..23070eb 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaMain.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaMain.java @@ -26,11 +26,11 @@ import jaxx.runtime.SwingUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; import org.chorem.lima.ui.MainViewHandler; import org.chorem.lima.ui.opening.OpeningView; +import org.chorem.lima.web.service.HttpServerService; import javax.swing.*; import java.util.Arrays; @@ -55,6 +55,9 @@ public class LimaMain { /** splash */ protected static LimaSplash splash; + /** http serveur */ + protected static HttpServerService httpServerService; + /** * Lima main method. * @@ -144,11 +147,11 @@ public class LimaMain { // if not, call #loadDefaultAccount() splash.updateProgression(0.7, t("lima.launch.accounting")); - //start http server - LimaServiceFactory.getService(HttpServerService.class).start(); - AccountService accountService = LimaServiceFactory.getService(AccountService.class); + //start http server + getHttpServerService().start(); + long accountCount = accountService.getAccountCount(); if (accountCount == 0) { if (log.isInfoEnabled()) { @@ -195,4 +198,11 @@ public class LimaMain { } } } + + public static HttpServerService getHttpServerService() { + if (httpServerService == null) { + httpServerService = new HttpServerService(); + } + return httpServerService; + } } 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 d9a3180..62e70bb 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 @@ -27,9 +27,9 @@ import jaxx.runtime.swing.AboutPanel; import jaxx.runtime.swing.config.ConfigUIHelper; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaMain; import org.chorem.lima.LimaSwingApplicationContext; import org.chorem.lima.LimaSwingConfig; -import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.enums.ImportExportEnum; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.account.AccountView; @@ -482,8 +482,7 @@ public class MainViewHandler { } public void loadURI(MainView ui) { - int port = LimaServiceFactory.getService( - HttpServerService.class).getHttpPort(); + int port = LimaMain.getHttpServerService().getHttpPort(); String address = LimaSwingConfig.getInstance().getHostAdress(); String url = "http://" + address + ":" + port + "/"; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java index bce6335..e1d5e13 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java @@ -336,7 +336,7 @@ public class LetteringViewHandler{ BigDecimal creditVal = debit ? BigDecimal.ZERO : amount; if (log.isDebugEnabled()) { - log.debug("Balance calculation"); + log.debug("balance calculation"); } if (debitVal.equals(BigDecimal.ZERO)){ diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java deleted file mode 100644 index 3b734a2..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.chorem.lima.ui.report; - -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.JasperCompileManager; -import net.sf.jasperreports.engine.JasperExportManager; -import net.sf.jasperreports.engine.JasperFillManager; -import net.sf.jasperreports.engine.JasperPrint; -import net.sf.jasperreports.engine.JasperReport; -import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.LimaTechnicalException; -import java.io.File; -import org.apache.commons.logging.Log; -import org.chorem.lima.ui.report.dataSource.AccountCustomDataSourceFabric; -import org.chorem.lima.ui.report.dataSource.BalanceCustomDataSourceFabric; - -import java.util.HashMap; - -/** - * Created by davidcosse on 02/10/14. - */ -public class ReportBuilder { - - private static final Log log = LogFactory.getLog(ReportBuilder.class); - - protected JasperReport accountReport; - protected JasperReport balanceReport; - - // TODO DCossé 02/10/14 remove it as soon as maven jasper plugin works - public ReportBuilder() { - try { - // compile phase - String rootPath = new File("").getAbsolutePath(); - accountReport = JasperCompileManager.compileReport(rootPath + "/src/main/jasperreports/accounts/AccountReport.jrxml"); - balanceReport= JasperCompileManager.compileReport(rootPath + "/src/main/jasperreports/balance/BalanceReport.jrxml"); - } catch (JRException e) { - throw new LimaTechnicalException(e); - } - } - - - public void generateAccountReport(String path) { - - try { - // fill up report - JasperPrint jasperPrint = JasperFillManager.fillReport(accountReport, new HashMap(), new JRBeanCollectionDataSource(ReportFactory.createNewAccountBeanDocument())); - // same as before but with call to custom datasource -// JasperPrint jasperPrint = JasperFillManager.fillReport(accountReport, new HashMap(), new AccountCustomDataSourceFabric.AccountCustomDataSource()); - - // eport to PDF - JasperExportManager.exportReportToPdfFile(jasperPrint, path); - if (log.isInfoEnabled()) { - log.info("Rapport généré:"+path); - } - - } catch (JRException e) { - throw new LimaTechnicalException(e); - } - - } - - public void generateBalanceReport(String path) { - - try { - // fill up report - JasperPrint jasperPrint = JasperFillManager.fillReport(balanceReport, new HashMap(), new JRBeanCollectionDataSource(ReportFactory.createBalanceBeanCollection())); - // same as before but with call to custom datasource -// JasperPrint jasperPrint = JasperFillManager.fillReport(balanceReport, new HashMap(), new BalanceCustomDataSourceFabric.BalanceCustomData()); - - // eport to PDF - JasperExportManager.exportReportToPdfFile(jasperPrint, path); - if (log.isInfoEnabled()) { - log.info("Rapport généré:"+path); - } - - } catch (JRException e) { - throw new LimaTechnicalException(e); - } - - } - - public void generateBalanceReportAccount() { - - } -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java deleted file mode 100644 index a55a9e5..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/report/ReportFactory.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.chorem.lima.ui.report; - -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import com.google.common.collect.Lists; -import net.sf.jasperreports.engine.JRDataSource; -import org.chorem.lima.beans.AccountBean; -import org.chorem.lima.beans.AccountBeanImpl; -import org.chorem.lima.beans.BalanceReport; -import org.chorem.lima.beans.BalanceReportAccount; -import org.chorem.lima.beans.BalanceReportAccountImpl; -import org.chorem.lima.beans.BalanceReportImpl; -import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.ui.report.dataSource.AccountCustomDataSourceFabric; - -import java.io.File; -import java.util.Date; -import java.util.List; - -/** - * Created by davidcosse on 02/10/14. - */ -public class ReportFactory { - - protected static AccountService accountService; - protected static String rootPath = new File("").getAbsolutePath(); - protected static String balanceReportAccountReportPath = rootPath + "/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml"; - protected static String balanceSubAccountsReport = rootPath + "/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml"; - - - public static List<org.chorem.lima.entity.Account> createNewAccountDocument() { - accountService = LimaServiceFactory.getService(AccountService.class); - List<org.chorem.lima.entity.Account> accounts = accountService.getAllAccounts(); - return accounts; - } - - public static List<AccountBean> createNewAccountBeanDocument() { - AccountBean a1 = new AccountBeanImpl(); - a1.setAccountNumber("000"); - a1.setLabel("premier"); - - AccountBean a2 = new AccountBeanImpl(); - a2.setAccountNumber("001"); - a2.setLabel("deuxième"); - - AccountBean a3 = new AccountBeanImpl(); - a3.setAccountNumber("002"); - a3.setLabel("troisième"); - - AccountBean a4 = new AccountBeanImpl(); - a4.setAccountNumber("003"); - a4.setLabel("quatrième"); - List<AccountBean> accounts = Lists.newArrayList(a1, a2, a3, a4); - return accounts; - } - - public static List<BalanceReport> createBalanceBeanCollection() { - BalanceReport br0 = new BalanceReportImpl(); - br0.setCurrency("EURO"); - br0.setFromAccount("100000"); - br0.setToAccount("999999"); - br0.setFromDate(new Date()); - br0.setToDate(new Date()); - br0.setBalanceReportAccountPath(balanceReportAccountReportPath); - - BalanceReportAccount class1 = new BalanceReportAccountImpl(); - class1.setBalanceSubAccountsReportPath(balanceSubAccountsReport); - br0.addAccounts(class1); - - class1.setAccountNumber("100000"); - class1.setLabel("TOTAL 1"); - class1.setAmountDebit("1 176 285.16"); - class1.setAmountCredit("224 466.74"); - class1.setSoldeDebit("1 007 245.42"); - class1.setSoldeCredit("55 427.00"); - - BalanceReportAccount a110000 = new BalanceReportAccountImpl(); - a110000.setAccountNumber("110000"); - a110000.setLabel("report à nouveau"); - a110000.setAmountDebit("2 677.00"); - a110000.setAmountCredit("1 343.00"); - a110000.setSoldeDebit("1 334.00"); - - BalanceReportAccount a108 = new BalanceReportAccountImpl(); - a108.setAccountNumber("108000"); - a108.setLabel("Compte de l'exploitant"); - a108.setAmountDebit("27 023.73"); - a108.setAmountCredit("15 300.00"); - a108.setSoldeDebit("11 723.73"); - - class1.addSubAccounts(a110000); - class1.addSubAccounts(a108); - - BalanceReportAccount class2 = new BalanceReportAccountImpl(); - class2.setBalanceSubAccountsReportPath(balanceSubAccountsReport); - br0.addAccounts(class2); - - class2.setAccountNumber("200000"); - class2.setLabel("TOTAL 2"); - class2.setAmountDebit("2 867 904.76"); - class2.setAmountCredit("2 867 904.76"); - class2.setSoldeDebit("1 979 199.44"); - class2.setSoldeCredit("1 979 199.44"); - - BalanceReportAccount a2815 = new BalanceReportAccountImpl(); - a2815.setAccountNumber("a28150"); - a2815.setLabel("Installations techniques; matériel et outillage industriels"); - a2815.setAmountDebit("37 446.00"); - a2815.setAmountCredit("32 020.00"); - a2815.setSoldeDebit("5 426.00"); - - BalanceReportAccount a28130000 = new BalanceReportAccountImpl(); - a28130000.setAccountNumber("28130000"); - a28130000.setLabel("Constructions même ventilation que celle du compte 213"); - - class2.addSubAccounts(a2815); - class2.addSubAccounts(a28130000); - - List<BalanceReport> result = Lists.newArrayList(br0); - return result; - } - - public static JRDataSource getAccountJRDatadSource() { - return new AccountCustomDataSourceFabric.AccountCustomDataSource(); - } - -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java deleted file mode 100644 index 3760dbb..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/AccountCustomDataSourceFabric.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.chorem.lima.ui.report.dataSource; - -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import net.sf.jasperreports.engine.JRDataSource; -import net.sf.jasperreports.engine.JRDataSourceProvider; -import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.JRField; -import net.sf.jasperreports.engine.JasperReport; -import net.sf.jasperreports.engine.base.JRBaseField; -import org.chorem.lima.beans.AccountBean; -import org.chorem.lima.ui.report.ReportFactory; - -import java.util.HashMap; -import java.util.List; - -/** - * Created by davidcosse on 28/10/14. - */ -public class AccountCustomDataSourceFabric { - /** - * Created by davidcosse on 03/10/14. - * this class will be removed. - * It show how to configure a custom datasource - */ - public static class AccountDataSourceProvider implements JRDataSourceProvider { - - private class AccountField extends JRBaseField { - - private static final long serialVersionUID = 4771755443118002691L; - - public AccountField(String name, String description, Class<?> type) { - this.name = name; - this.description = description; - this.valueClass = type; - this.valueClassName = type.getName(); - } - - public AccountField(String name,String description){ - this(name, description, String.class); - } - } - - @Override - public boolean supportsGetFieldsOperation() { - return true; - } - - @Override - public JRField[] getFields(JasperReport report) throws JRException, UnsupportedOperationException { - JRField field1 = new AccountField("accountNumber","Account number"); - JRField field2 = new AccountField("label","acount description"); - return new JRField[]{field1, field2}; - } - - @Override - public JRDataSource create(JasperReport report) throws JRException { - return new AccountCustomDataSource(ReportFactory.createNewAccountBeanDocument()); - } - - @Override - public void dispose(JRDataSource dataSource) throws JRException { - - } - } - - /** - * Created by davidcosse on 03/10/14. - */ - public static class AccountCustomDataSource implements JRDataSource { - - private static List<AccountBean> accounts; - - public AccountCustomDataSource() { - this.accounts= ReportFactory.createNewAccountBeanDocument(); - } - - public AccountCustomDataSource(List<AccountBean> accounts) { - this.accounts = accounts; - } - - /** - * Variables to store the number of fields, and their names, in the report - */ - private HashMap<String, Integer> fieldsNumber = new HashMap<String, Integer>(); - private int lastFieldsAdded = 0; - - /** - * Variable to store how much records were read - */ - private int counter = -1; - - @Override - public boolean next() throws JRException { - if (counter<accounts.size()-1) { - counter++; - return true; - } - return false; - } - - @Override - public Object getFieldValue(JRField jrField) throws JRException { - Integer fieldIndex; - if (fieldsNumber.containsKey(jrField.getName())) - fieldIndex = fieldsNumber.get(jrField.getName()); - else { - fieldsNumber.put(jrField.getName(), lastFieldsAdded); - fieldIndex = lastFieldsAdded; - lastFieldsAdded ++; - } - if (fieldIndex == 0) return accounts.get(counter).getAccountNumber(); - else if (fieldIndex == 1) return accounts.get(counter).getLabel(); - return ""; - } - } -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java b/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java deleted file mode 100644 index f432eff..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/report/dataSource/BalanceCustomDataSourceFabric.java +++ /dev/null @@ -1,147 +0,0 @@ -package org.chorem.lima.ui.report.dataSource; - -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import net.sf.jasperreports.engine.JRDataSource; -import net.sf.jasperreports.engine.JRDataSourceProvider; -import net.sf.jasperreports.engine.JRException; -import net.sf.jasperreports.engine.JRField; -import net.sf.jasperreports.engine.JasperReport; -import net.sf.jasperreports.engine.base.JRBaseField; -import org.chorem.lima.beans.BalanceReport; -import org.chorem.lima.ui.report.ReportFactory; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; - -/** - * Created by davidcosse on 28/10/14. - * this class will be removed. - * It show how to configure a custom datasource - */ -public class BalanceCustomDataSourceFabric { - - /** - * Created by davidcosse on 28/10/14. - */ - public static class BalanceDataSourceProvider implements JRDataSourceProvider { - - private class BalanceField extends JRBaseField { - - private static final long serialVersionUID = 1L; - - public BalanceField(String name, String description, Class<?> type) { - this.name = name; - this.description = description; - this.valueClass = type; - this.valueClassName = type.getName(); - } - - public BalanceField(String name,String description){ - this(name, description, String.class); - } - } - - @Override - public boolean supportsGetFieldsOperation() { - return true; - } - - @Override - public JRField[] getFields(JasperReport report) throws JRException, UnsupportedOperationException { - JRField field1 = new BalanceField("fromDate","du", Date.class); - JRField field2 = new BalanceField("toDate","au", Date.class); - JRField field3 = new BalanceField("currency","currency"); - JRField field4 = new BalanceField("fromAccount","du compte"); - JRField field5 = new BalanceField("toAccount","jusqu'au compte"); - JRField field6 = new BalanceField("accounts","comptes", List.class); - - return new JRField[]{field1, field2, field3, field4, field5, field6}; - } - - @Override - public JRDataSource create(JasperReport report) throws JRException { - return new BalanceCustomData(ReportFactory.createBalanceBeanCollection()); - } - - @Override - public void dispose(JRDataSource dataSource) throws JRException { - - } - } - - - public static class BalanceCustomData implements JRDataSource { - private static List<BalanceReport> balanceReports; - - public BalanceCustomData() { - this.balanceReports = ReportFactory.createBalanceBeanCollection(); - } - - public BalanceCustomData(List<BalanceReport> balances) { - this.balanceReports = balances; - } - - /** - * Variables to store the number of fields, and their names, in the report - */ - private HashMap<String, Integer> fieldsNumber = new HashMap<String, Integer>(); - private int lastFieldsAdded = 0; - - /** - * Variable to store how much records were read - */ - private int counter = -1; - - @Override - public boolean next() throws JRException { - if (counter < balanceReports.size() - 1) { - counter++; - return true; - } - return false; - } - - @Override - public Object getFieldValue(JRField jrField) throws JRException { - Integer fieldIndex; - if (fieldsNumber.containsKey(jrField.getName())) - fieldIndex = fieldsNumber.get(jrField.getName()); - else { - fieldsNumber.put(jrField.getName(), lastFieldsAdded); - fieldIndex = lastFieldsAdded; - lastFieldsAdded++; - } - - if (fieldIndex == 0) return balanceReports.get(counter).getFromDate(); - else if (fieldIndex == 1) return balanceReports.get(counter).getToDate(); - else if (fieldIndex == 2) return balanceReports.get(counter).getCurrency(); - else if (fieldIndex == 3) return balanceReports.get(counter).getFromAccount(); - else if (fieldIndex == 4) return balanceReports.get(counter).getToAccount(); - else if (fieldIndex == 5) return balanceReports.get(counter).getAccounts(); - return ""; - } - - } -} diff --git a/lima-web/LICENSE.txt b/lima-web/LICENSE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/lima-web/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/lima-web/README.txt b/lima-web/README.txt new file mode 100644 index 0000000..be7fe95 --- /dev/null +++ b/lima-web/README.txt @@ -0,0 +1,20 @@ +Présentation : + +Acronyme de Lutin Invoice Monitoring and Accounting, +l'application de comptabilité Lima est un logiciel libre pensé pour être le plus ergonomique possible et facile d'accès à tout utilisateur, +quelque soit son niveau en comptabilité : débutant comme confirmé. +La particularité de Lima est qu'il s'agit d'un produit évolutif permettant de répondre aux besoins spécifiques de toute entreprise ou organisation, +tout en garantissant le maintien des données comptables. + +Le logiciel est écrit en Java ce qui assure une compatibilité multiplateforme : Windows, Mac OS X, Linux. +Il peut-être installé en fonctionnement client monoposte, ou en configuration client <–> serveur. +Lors d'une installation en client serveur, le moteur de persistence de données est installé coté serveur, +et l'interface est installée sur autant de postes client que désiré. + +Pour lancer l'application : + + Sous Linux : via le script lima ou en ligne de commande java -jar lima.jar ; + + Sous Mac OS X : en double-cliquant sur le jar lima.jar ; + + Sous Windows : en double-cliquant sur l'éxécutable lima.exe. \ No newline at end of file diff --git a/lima-business/pom.xml b/lima-web/pom.xml similarity index 71% copy from lima-business/pom.xml copy to lima-web/pom.xml index 2b6774e..669412a 100644 --- a/lima-business/pom.xml +++ b/lima-web/pom.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -10,38 +11,42 @@ </parent> <groupId>org.chorem.lima</groupId> - <artifactId>lima-business</artifactId> + <artifactId>lima-web</artifactId> - <name>Lima :: business</name> - <description>Business module for lima</description> + <name>Lima :: web</name> + <description>Lima Web Module</description> <properties> <!--Main class in JAR --> <maven.jar.main.class>org.chorem.lima.LimaServer</maven.jar.main.class> <redmine.releaseFiles> - target/lima-server-${project.version}-bin.zip + target/lima-web-server-${project.version}-bin.zip </redmine.releaseFiles> </properties> <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>lima-callao</artifactId> + <artifactId>lima-business-api</artifactId> <version>${project.version}</version> + <scope>compile</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>lima-business-api</artifactId> + <artifactId>lima-business</artifactId> <version>${project.version}</version> + <scope>compile</scope> </dependency> <dependency> - <groupId>org.apache.pdfbox</groupId> - <artifactId>pdfbox</artifactId> + <groupId>${project.groupId}</groupId> + <artifactId>lima-callao</artifactId> + <version>${project.version}</version> </dependency> <dependency> - <groupId>org.apache.pdfbox</groupId> - <artifactId>pdfbox-examples</artifactId> + <groupId>${project.groupId}</groupId> + <artifactId>lima-business-api</artifactId> + <version>${project.version}</version> </dependency> <dependency> <groupId>junit</groupId> @@ -52,67 +57,18 @@ <artifactId>nuiton-utils</artifactId> </dependency> <dependency> - <groupId>org.nuiton.i18n</groupId> - <artifactId>nuiton-i18n</artifactId> - </dependency> - <dependency> - <groupId>org.nuiton.topia</groupId> - <artifactId>topia-persistence</artifactId> - </dependency> - <dependency> - <groupId>org.nuiton.topia</groupId> - <artifactId>topia-service-flyway</artifactId> - </dependency> - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-config</artifactId> - </dependency> - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-csv</artifactId> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-core</artifactId> - </dependency> - <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - </dependency> - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>javaee-api</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.openejb</groupId> - <artifactId>openejb-ejbd</artifactId> + <groupId>org.nuiton.i18n</groupId> + <artifactId>nuiton-i18n</artifactId> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> <dependency> - <groupId>org.jboss.spec.javax.transaction</groupId> - <artifactId>jboss-transaction-api_1.2_spec</artifactId> - </dependency> - <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-servlet</artifactId> </dependency> @@ -121,10 +77,9 @@ <artifactId>jetty-server</artifactId> </dependency> <dependency> - <groupId>commons-codec</groupId> - <artifactId>commons-codec</artifactId> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> </dependency> - </dependencies> <build> @@ -146,6 +101,24 @@ <pluginManagement> <plugins> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jasperreports-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>compile-reports</goal> + </goals> + </execution> + </executions> + <dependencies> + <!--note this must be repeated here to pick up correct xml validation --> + <dependency> + <groupId>net.sf.jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + </dependencies> + </plugin> + <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> @@ -202,7 +175,7 @@ <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> - <finalName>lima-server-${project.version}</finalName> + <finalName>lima-web-server-${project.version}</finalName> <descriptors> <descriptor>src/main/assembly/bin.xml</descriptor> </descriptors> @@ -258,4 +231,5 @@ </profile> </profiles> -</project> + +</project> \ No newline at end of file diff --git a/lima-web/src/main/assembly/bin.xml b/lima-web/src/main/assembly/bin.xml new file mode 100644 index 0000000..90d5813 --- /dev/null +++ b/lima-web/src/main/assembly/bin.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Lima :: business + %% + Copyright (C) 2008 - 2010 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% + --> + +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + <id>bin</id> + <formats> + <format>zip</format> + </formats> + + <files> + <file> + <source>target/${project.build.finalName}.${project.packaging}</source> + <destName>lima-server.${project.packaging}</destName> + </file> + <file> + <source>src/main/assembly/lima-server</source> + <fileMode>0755</fileMode> + </file> + </files> + <fileSets> + <fileSet> + <directory>target/lib</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + <excludes> + <exclude>junit-*.jar</exclude> + </excludes> + </fileSet> + <fileSet> + <includes> + <include>README*</include> + <include>LICENSE*</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/resources/reports</directory> + <outputDirectory>reports</outputDirectory> + <includes> + <include>*.pdf</include> + </includes> + </fileSet> + </fileSets> +</assembly> diff --git a/lima-web/src/main/assembly/lima-server b/lima-web/src/main/assembly/lima-server new file mode 100755 index 0000000..f79c621 --- /dev/null +++ b/lima-web/src/main/assembly/lima-server @@ -0,0 +1,9 @@ +#!/bin/sh +MX=512M +cd `dirname $0` +if [ -n "$JAVA_HOME" ]; then + $JAVA_HOME/bin/java -Xmx$MX -Xms$MX -jar ./lima-server.jar $* +else + java -Xmx$MX -Xms$MX -jar ./lima-server.jar $* +fi +cd "$OLDPWD" diff --git a/lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml b/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml similarity index 100% rename from lima-swing/src/main/jasperreports/accounts/AccountReport.jrxml rename to lima-web/src/main/jasperreports/accounts/AccountReport.jrxml diff --git a/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml new file mode 100644 index 0000000..a0339b9 --- /dev/null +++ b/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml @@ -0,0 +1,347 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T17:37:18 --> +<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" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="66929b65-d52d-4e6b-8d8e-8bd4ef5ac821"> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <style name="Column header" forecolor="#D0B48E" backcolor="#F2EBDF" fontName="Arial" fontSize="12" isBold="true"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="fromDate" class="java.util.Date"/> + <field name="toDate" class="java.util.Date"/> + <field name="currency" class="java.lang.String"/> + <field name="fromAccount" class="java.lang.String"/> + <field name="toAccount" class="java.lang.String"/> + <field name="accounts" class="java.util.List"/> + <field name="balanceReportAccountPath" class="java.lang.String"/> + <field name="companyName" class="java.lang.String"/> + <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> + </variable> + <group name="accounts"/> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band height="41" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textField pattern="dd/MM/yyyy"> + <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 verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromDate}]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="e7bf1b4c-d748-4c99-b9e2-838903711b48"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true" pdfFontName="Times-Roman"/> + </textElement> + <text><![CDATA[Balance]]></text> + </staticText> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement style="Default" x="480" y="0" width="98" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default" x="422" y="0" width="58" height="20" forecolor="#736343" uuid="ddf50f55-7669-44be-b427-d03bc72cc264"/> + <textElement textAlignment="Center" verticalAlignment="Middle"/> + <text><![CDATA[Edition du:]]></text> + </staticText> + <staticText> + <reportElement style="Default" x="190" y="20" width="20" height="20" forecolor="#736343" uuid="08282b18-8e67-4bcb-878e-ac97dc0bbc5b"> + <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> + <text><![CDATA[Du]]></text> + </staticText> + <staticText> + <reportElement style="Default" x="290" y="20" width="20" height="20" forecolor="#736343" uuid="e149a451-2c1c-4d8d-9b01-85e35144eb86"> + <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> + <text><![CDATA[au]]></text> + </staticText> + <textField pattern="dd/MM/yyyy"> + <reportElement style="Default" x="310" 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[$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 isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{companyName}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="25" splitType="Stretch"> + <staticText> + <reportElement style="Default oblique" x="0" y="9" width="42" height="16" uuid="33ba6496-bc27-466f-9764-7336b6741c13"> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <text><![CDATA[Comptes :]]></text> + </staticText> + <textField isBlankWhenNull="true"> + <reportElement style="Default oblique" x="42" y="9" width="402" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="local_mesure_unitwidth" value="pixel"/> + <property name="com.jaspersoft.studio.unit.width" value="px"/> + </reportElement> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{fromAccount}]]></textFieldExpression> + </textField> + <staticText> + <reportElement style="Default oblique" x="444" y="9" width="30" height="16" forecolor="#000000" uuid="02207af8-5ccd-43c9-b475-acb534bcd6cf"> + <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 size="8"/> + </textElement> + <text><![CDATA[Devise:]]></text> + </staticText> + <textField> + <reportElement style="Default oblique" x="474" y="9" width="104" 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="Left" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$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" 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Compte]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Intitulé]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Total Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + <staticText> + <reportElement 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="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Solde Période]]></text> + </staticText> + <staticText> + <reportElement 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"/> + <leftPen lineWidth="0.6"/> + <bottomPen lineWidth="0.6"/> + <rightPen lineWidth="0.6"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Débit]]></text> + </staticText> + <staticText> + <reportElement 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"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <text><![CDATA[Crédit]]></text> + </staticText> + </frame> + </band> + </columnHeader> + <detail> + <band height="20" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{accounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceReportAccountPath})]]></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"/> + <textField> + <reportElement x="295" y="0" width="50" height="10" uuid="bbf610ed-68ca-4ff7-992a-b894a61b2379"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_COUNT}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="235" y="0" width="50" height="10" uuid="7f4c8e82-7fe3-4207-ab07-1a8c4d977a94"> + <property name="local_mesure_unitheight" value="pixel"/> + <property name="com.jaspersoft.studio.unit.height" value="px"/> + </reportElement> + <textElement> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="285" y="0" width="10" height="10" uuid="2609dfd4-556d-4dbd-8d23-74474c5b344c"> + <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 textAlignment="Center"> + <font size="8"/> + </textElement> + <text><![CDATA[/]]></text> + </staticText> + </band> + </pageFooter> +</jasperReport> diff --git a/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml new file mode 100644 index 0000000..e16efa2 --- /dev/null +++ b/lima-web/src/main/jasperreports/balance/BalanceReportAccountReport.jrxml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T15:21: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="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <field name="subAccounts" class="java.util.List"/> + <field name="balanceSubAccountsReportPath" class="java.lang.String"/> + <variable name="subAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> + <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{subAccounts})]]></variableExpression> + </variable> + <detail> + <band height="10" splitType="Stretch"> + <subreport isUsingCache="false" runToBottom="false"> + <reportElement key="subreport-5" positionType="Float" mode="Transparent" x="0" y="0" width="578" height="10" isRemoveLineWhenBlank="true" forecolor="#000000" backcolor="#FFFFFF" uuid="d7fbefd9-03b1-4eaf-b7c6-fb46c737190a"/> + <dataSourceExpression><![CDATA[$V{subAccounts}]]></dataSourceExpression> + <subreportExpression><![CDATA[JasperCompileManager.compileReport($F{balanceSubAccountsReportPath})]]></subreportExpression> + </subreport> + </band> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="true"/> + <!--<font fontName="Courier 10 Pitch" size="8" isBold="true"/>--> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band height="1"> + <line> + <reportElement style="Default" x="0" y="0" width="578" height="1" uuid="ca761e3c-0dba-448f-a60d-afc241c74411"/> + </line> + </band> + </columnFooter> +</jasperReport> diff --git a/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml new file mode 100644 index 0000000..b6fb933 --- /dev/null +++ b/lima-web/src/main/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 5.6.1 --> +<!-- 2014-11-04T15:21:33 --> +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="21" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> + <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> + <property name="com.jaspersoft.studio.unit." value="pixel"/> + <style name="Default" isDefault="true" fontName="Arial" /> + <style name="Default oblique" isDefault="true" fontName="Monospaced" /> + <queryString> + <![CDATA[]]> + </queryString> + <field name="accountNumber" class="java.lang.String"/> + <field name="label" class="java.lang.String"/> + <field name="amountDebit" class="java.lang.String"/> + <field name="amountCredit" class="java.lang.String"/> + <field name="soldeDebit" class="java.lang.String"/> + <field name="soldeCredit" class="java.lang.String"/> + <detail> + <band height="10" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="40" height="10" uuid="c5f32333-c77a-45f8-9bec-c8d61e15d85a"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{accountNumber}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="40" y="0" width="250" height="10" uuid="0bcc6e5d-b2ee-474f-8e66-475933d55a16"> + <property name="local_mesure_unity" value="pixel"/> + </reportElement> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8"/> + <paragraph leftIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{label}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="290" y="0" width="72" height="10" uuid="e774e638-6353-46d0-9968-15992ef50bd3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="362" y="0" width="72" height="10" uuid="daac5561-4c81-4582-aabf-e8034c2cf93e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{amountCredit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="434" y="0" width="72" height="10" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeDebit}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="506" y="0" width="72" height="10" uuid="edb8a8c1-ac7a-44cb-9de6-b231b00f966f"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <!--<font fontName="Courier 10 Pitch" size="8"/>--> + <paragraph rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[$F{soldeCredit}]]></textFieldExpression> + </textField> + </band> + </detail> +</jasperReport> diff --git a/lima-web/src/main/java/org/chorem/lima/LimaServer.java b/lima-web/src/main/java/org/chorem/lima/LimaServer.java new file mode 100644 index 0000000..77c24b9 --- /dev/null +++ b/lima-web/src/main/java/org/chorem/lima/LimaServer.java @@ -0,0 +1,75 @@ +/* + * #%L + * Lima :: business + * %% + * Copyright (C) 2011 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% + */ + +package org.chorem.lima; + +import org.apache.openejb.core.LocalInitialContextFactory; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import java.util.Properties; + +/** + * Lima server class. + * <p/> + * Starts openejb server. + * + * @author chatellier + * @version $Revision$ + * <p/> + * Last update : $Date$ + * By : $Author$ + */ +public class LimaServer { + + /** + * Lima server. + * + * @param args + * @throws javax.naming.NamingException + */ + public static void main(String... args) throws NamingException { + Properties properties = new Properties(); + properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName()); + properties.setProperty("openejb.embedded.remotable", "true"); + // Uncomment these properties to change the defaults + //properties.setProperty("ejbd.port", "4202"); + properties.setProperty("ejbd.bind", "0.0.0.0"); + //properties.setProperty("ejbd.threads", "200"); + //properties.setProperty("ejbd.disabled", "false"); + //properties.setProperty("ejbd.only_from", "127.0.0.1,192.168.1.1"); + + new InitialContext(properties); + + // block main otherwize, main will end + synchronized (properties) { + try { + properties.wait(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + System.out.println("Server shutdown"); + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java similarity index 93% rename from lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java rename to lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java index d5ce60c..13171df 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java +++ b/lima-web/src/main/java/org/chorem/lima/web/action/DocumentService.java @@ -20,44 +20,44 @@ * #L% */ -package org.chorem.lima.business.ejb; +package org.chorem.lima.web.action; import com.google.common.base.Strings; +import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.pdfbox.examples.fdf.SetField; import org.apache.pdfbox.pdmodel.PDDocument; import org.chorem.lima.LimaTechnicalException; +import org.chorem.lima.business.api.AccountService; +import org.chorem.lima.business.api.ClosedPeriodicEntryBookService; +import org.chorem.lima.business.api.EntryService; +import org.chorem.lima.business.api.FinancialPeriodService; +import org.chorem.lima.business.api.report.BalanceBeanReportService; +import org.chorem.lima.web.action.balance.BalanceReportBuilder; +import org.chorem.lima.beans.BalanceReport; import org.chorem.lima.beans.BalanceTrial; import org.chorem.lima.beans.FinancialStatementAmounts; import org.chorem.lima.beans.GeneralEntryBooksDatas; import org.chorem.lima.beans.GeneralEntryBooksDatasImpl; import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaServiceConfig; -import org.chorem.lima.business.api.DocumentService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.api.VatStatementService; -import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.entity.Account; -import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.ClosedPeriodicEntryBook; -import org.chorem.lima.entity.ClosedPeriodicEntryBookTopiaDao; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; -import org.chorem.lima.entity.EntryTopiaDao; import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.FinancialPeriodTopiaDao; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.VatStatement; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.web.utils.DocumentsEnum; -import javax.ejb.EJB; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.ejb.TransactionAttribute; import javax.swing.*; import java.io.File; import java.io.FileInputStream; @@ -72,32 +72,47 @@ import java.util.List; import static org.nuiton.i18n.I18n.t; -/** - * TODO david: 17/01/14, Ce service doit être entièrement revue, !!! - */ -@Stateless -@Remote(DocumentService.class) -@TransactionAttribute -public class DocumentServiceImpl extends AbstractLimaService implements DocumentService { - protected static final Log log = LogFactory.getLog(DocumentServiceImpl.class); +public class DocumentService { + + protected static final Log log = LogFactory.getLog(DocumentService.class); - @EJB private IdentityService identityService; - @EJB private FinancialStatementService financialStatementService; - @EJB private ReportService reportService; - @EJB private VatStatementService vatStatementService; + protected BalanceBeanReportService balanceBeanReportService; + + protected ClosedPeriodicEntryBookService closedPeriodicEntryBookService; + + protected FinancialPeriodService financialPeriodService; + + protected EntryService entryService; + protected String path; - public DocumentServiceImpl() { + protected BalanceReportBuilder balanceReportBuilder; + + protected AccountService accountService; + + + public DocumentService() { path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); + identityService = LimaServiceFactory.getService(IdentityService.class); + financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); + reportService = LimaServiceFactory.getService(ReportService.class); + vatStatementService = LimaServiceFactory.getService(VatStatementService.class); + balanceBeanReportService = LimaServiceFactory.getService(BalanceBeanReportService.class); + closedPeriodicEntryBookService = LimaServiceFactory.getService(ClosedPeriodicEntryBookService.class); + financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class); + entryService = LimaServiceFactory.getService(EntryService.class); + accountService = LimaServiceFactory.getService(AccountService.class); + + balanceReportBuilder = new BalanceReportBuilder(); if (log.isDebugEnabled()) { log.debug("Path : " + path); @@ -105,7 +120,6 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document } - @Override public String createFinancialStatementsDocuments(Date beginDate, Date endDate) { @@ -243,7 +257,6 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document } //############## Ledger ############## - @Override public String createLedgerDocuments(Date beginDate, Date endDate) { @@ -380,7 +393,6 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document return ledgerReport; } - @Override public String createEntryBooksDocuments(Date beginDate, Date endDate) { String entryBookReport; @@ -390,27 +402,19 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document if (beginDate != null && endDate != null) { - ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao = - getDaoHelper().getClosedPeriodicEntryBookDao(); - EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); - //Split list by financialstatement type List<ClosedPeriodicEntryBook> closedPeriodicEntryBookList = - closedPeriodicEntryBookTopiaDao.findAllByDates(beginDate, endDate); + closedPeriodicEntryBookService.getAllByDates(beginDate, endDate); String journal = ""; for (ClosedPeriodicEntryBook closedPeriodicEntryBook : closedPeriodicEntryBookList) { // TODO echatellier 20120509, was not about only // balanced transaction here, normal ? - List<Entry> entries = entryTopiaDao.findAllEntryByDateForEntryBook(closedPeriodicEntryBook.getEntryBook(), - closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(), - closedPeriodicEntryBook.getFinancialPeriod().getEndDate()); + List<Entry> entries = entryService.findAllEntryByDateForEntryBook(closedPeriodicEntryBook); if (entries.size() > 0) { - List<Object[]> results = entryTopiaDao.getDebitCreditOfTransaction(closedPeriodicEntryBook.getEntryBook(), - closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(), - closedPeriodicEntryBook.getFinancialPeriod().getEndDate()); + List<Object[]> results = entryService.findDebitCreditOfTransaction(closedPeriodicEntryBook); BigDecimal debit = BigDecimal.ZERO; BigDecimal credit = BigDecimal.ZERO; int nbAmount = results.size(); @@ -477,9 +481,8 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document return entryBookReport; } - //############## Balance ############## + //############## balance ############## - @Override public String createBalanceDocuments(Date beginDate, Date endDate) { @@ -554,10 +557,7 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document return balanceReport; } - //############## General EntryBook ############## - - - @Override + //############## General EntryBook ############# public String createGeneralEntryBooksDocuments(Date beginDate, Date endDate) { @@ -573,21 +573,15 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document simpleDateFormat.format(endDate); entryBookReport += constructSubTitleHtml(subTitle); - FinancialPeriodTopiaDao financialPeriodTopiaDao = - getDaoHelper().getFinancialPeriodDao(); - ClosedPeriodicEntryBookTopiaDao closedPeriodicEntryBookTopiaDao = - getDaoHelper().getClosedPeriodicEntryBookDao(); - EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); - List<FinancialPeriod> financialPeriods = - financialPeriodTopiaDao.findByDates(beginDate, endDate); + financialPeriodService.getFinancialPeriods(beginDate, endDate); List<GeneralEntryBooksDatas> list = new ArrayList<GeneralEntryBooksDatas>(); BigDecimal amountDebit = BigDecimal.ZERO; BigDecimal amountCredit = BigDecimal.ZERO; for (FinancialPeriod financialPeriod : financialPeriods) { List<ClosedPeriodicEntryBook> closedPeriodicEntryBookList = - closedPeriodicEntryBookTopiaDao.findAllByDates( + closedPeriodicEntryBookService.getAllByDates( financialPeriod.getBeginDate(), financialPeriod.getEndDate()); BigDecimal subAmountDebit = BigDecimal.ZERO; @@ -597,9 +591,7 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document BigDecimal debit = BigDecimal.ZERO; BigDecimal credit = BigDecimal.ZERO; - List<Object[]> results = entryTopiaDao.getDebitCreditOfTransaction(closedPeriodicEntryBook.getEntryBook(), - closedPeriodicEntryBook.getFinancialPeriod().getBeginDate(), - closedPeriodicEntryBook.getFinancialPeriod().getEndDate()); + List<Object[]> results = entryService.findDebitCreditOfTransaction(closedPeriodicEntryBook); int nbAmount = results.size(); if (nbAmount == 2) { @@ -706,8 +698,6 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document } //############## VAT ############## - - @Override public void createVatDocuments(Date beginDate, Date endDate, String autocomplete) { @@ -726,7 +716,7 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document String vatPDFUrl = LimaServiceConfig.getInstance().getVatPDFUrl(); if (vatPDFUrl.equals("default")) { - reportsStream = DocumentServiceImpl.class + reportsStream = DocumentService.class .getResourceAsStream("/reports/vat_form_fr.pdf"); if (reportsStream == null) { throw new LimaTechnicalException("Could not find such file " @@ -782,15 +772,14 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document } } - @Override + public String createAccountDocument(Date beginDate, Date endDate, String account) { String accountReport = null; try { - AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - Account accountFormat = accountTopiaDao.forTopiaIdEquals(account).findUniqueOrNull(); + Account accountFormat = accountService.findAccountById(account); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMMMM yyyy"); accountReport = constructHtmlHeader(t("lima.reports.accounts")); @@ -982,4 +971,14 @@ public class DocumentServiceImpl extends AbstractLimaService implements Document return headerTitle; } + public BalanceReport buildGeneralEntryBooksDocuments(Date beginDate, Date endDate, String fromToAccount) { + String filePath = path + File.separator + + DocumentsEnum.BALANCE.getFileName() + ".pdf"; + + BalanceReport result = balanceBeanReportService.generateBalanceReportDocument(beginDate, endDate, fromToAccount); + balanceReportBuilder.generateBalanceReport(filePath, Lists.newArrayList(result)); + return result; + } + + } diff --git a/lima-web/src/main/java/org/chorem/lima/web/action/balance/BalanceReportBuilder.java b/lima-web/src/main/java/org/chorem/lima/web/action/balance/BalanceReportBuilder.java new file mode 100644 index 0000000..2cf2eb6 --- /dev/null +++ b/lima-web/src/main/java/org/chorem/lima/web/action/balance/BalanceReportBuilder.java @@ -0,0 +1,60 @@ +package org.chorem.lima.web.action.balance; + +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JasperCompileManager; +import net.sf.jasperreports.engine.JasperExportManager; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaTechnicalException; +import org.chorem.lima.beans.BalanceReport; + +import java.io.File; +import java.util.HashMap; +import java.util.List; + +/** + * Created by davidcosse on 02/10/14. + */ +public class BalanceReportBuilder { + + private static final Log log = LogFactory.getLog(BalanceReportBuilder.class); + + protected JasperReport accountReport; + protected JasperReport balanceReport; + + // TODO DCossé 02/10/14 remove it as soon as maven jasper plugin works + public BalanceReportBuilder() { + try { + // compile phase + String rootPath = new File("").getAbsolutePath(); + // TODO DCossé 06/11/14 find it from properties + accountReport = JasperCompileManager.compileReport(rootPath + "/lima-web/src/main/jasperreports/accounts/AccountReport.jrxml"); + balanceReport= JasperCompileManager.compileReport(rootPath + "/lima-web/src/main/jasperreports/balance/BalanceReport.jrxml"); + } catch (JRException e) { + throw new LimaTechnicalException(e); + } + } + + + public void generateBalanceReport(String path, List<BalanceReport> reports) { + + try { + // fill up report + JasperPrint jasperPrint = JasperFillManager.fillReport(balanceReport, new HashMap(), new JRBeanCollectionDataSource(reports)); + + // eport to PDF + JasperExportManager.exportReportToPdfFile(jasperPrint, path); + if (log.isInfoEnabled()) { + log.info("Rapport généré:"+path); + } + + } catch (JRException e) { + throw new LimaTechnicalException(e); + } + + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java b/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java similarity index 90% rename from lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java rename to lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java index cc96876..21a9eb0 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java +++ b/lima-web/src/main/java/org/chorem/lima/web/service/HttpServerService.java @@ -1,26 +1,4 @@ -/* - * #%L - * Lima :: business - * %% - * 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% - */ - -package org.chorem.lima.business.ejb; +package org.chorem.lima.web.service; import org.apache.commons.io.Charsets; import org.apache.commons.io.IOUtils; @@ -28,10 +6,12 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.web.action.DocumentService; +import org.chorem.lima.web.action.balance.BalanceReportBuilder; +import org.chorem.lima.beans.BalanceReport; import org.chorem.lima.business.LimaServiceConfig; import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.business.api.DocumentService; -import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.Account; @@ -42,10 +22,6 @@ import org.hibernate.exception.GenericJDBCException; import org.nuiton.util.FileUtil; import org.nuiton.util.Resource; -import javax.ejb.EJB; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.ejb.TransactionAttribute; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -64,17 +40,12 @@ import java.util.List; import static org.nuiton.i18n.I18n.t; -@Stateless -@Remote(HttpServerService.class) -@TransactionAttribute -public class HttpServerServiceImpl extends AbstractLimaService implements HttpServerService { +public class HttpServerService { - protected static final Log log = LogFactory.getLog(HttpServerServiceImpl.class); + protected static final Log log = LogFactory.getLog(HttpServerService.class); - @EJB private DocumentService documentService; - @EJB private AccountService accountService; protected Server server; @@ -85,13 +56,16 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("yyyy-MM-dd"); - public HttpServerServiceImpl() { + protected BalanceReportBuilder balanceReportBuilder = new BalanceReportBuilder(); + + public HttpServerService() { path = LimaServiceConfig.getInstance().getReportsDir().getAbsolutePath(); port = LimaServiceConfig.getInstance().getHttpPort(); + accountService = LimaServiceFactory.getService(AccountService.class); + documentService = new DocumentService(); } /** start the server */ - @Override public void start() { if (server == null) { try { @@ -115,7 +89,6 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe } } - @Override public int getHttpPort() { return port; } @@ -161,7 +134,7 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe String accountReport = null; String entryBooksReport = null; String generalEntryBooksReport = null; - String balanceReport = null; + BalanceReport balanceReport = null; String ledgerReport = null; String financialReport = null; @@ -172,8 +145,7 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe switch (DocumentsEnum.valueOfLink(model)) { case BALANCE: - balanceReport = documentService.createBalanceDocuments( - beginDateFormat, endDateFormat); + documentService.buildGeneralEntryBooksDocuments(beginDateFormat, endDateFormat, null); break; case ACCOUNT: accountReport = documentService.createAccountDocument( @@ -215,7 +187,7 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe } if ( (accountReport != null || entryBooksReport != null || generalEntryBooksReport != null - || balanceReport != null || ledgerReport != null || financialReport != null)) { + || ledgerReport != null || financialReport != null)) { String report; resp.setContentType(".html"); OutputStream out = resp.getOutputStream(); @@ -225,8 +197,6 @@ public class HttpServerServiceImpl extends AbstractLimaService implements HttpSe report = entryBooksReport; } else if (generalEntryBooksReport != null) { report = generalEntryBooksReport; - } else if (balanceReport != null) { - report = balanceReport; } else if (ledgerReport != null) { report = ledgerReport; } else { diff --git a/lima-web/src/main/java/org/chorem/lima/web/utils/DocumentsEnum.java b/lima-web/src/main/java/org/chorem/lima/web/utils/DocumentsEnum.java new file mode 100644 index 0000000..44e5924 --- /dev/null +++ b/lima-web/src/main/java/org/chorem/lima/web/utils/DocumentsEnum.java @@ -0,0 +1,67 @@ +/* + * #%L + * Lima :: business + * %% + * Copyright (C) 2008 - 2010 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% + */ + +package org.chorem.lima.web.utils; + +import static org.nuiton.i18n.I18n.t; + + +public enum DocumentsEnum { + + GENERAL_ENTRYBOOK(t("lima-business.document.generalentrybook"), "lima_general_entybook"), + ENTRYBOOKS(t("lima-business.document.entrybook"), "lima_entrybooks"), + BALANCE(t("lima-business.document.balance"), "lima_balance"), + LEDGER(t("lima-business.document.ledger"), "lima_ledger"), + FINANCIALSTATEMENT(t("lima-business.document.financialstatement"), "lima_financialstatements"), + VAT(t("lima-business.document.vat"), "lima_vat"), + ACCOUNT(t("lima-business.document.account"), "lima_account"); + + private final String fileName; + + private final String description; + + private DocumentsEnum(String description, String fileName) { + this.description = description; + this.fileName = fileName; + } + + public String getFileName() { + return fileName; + } + + public String getDescription() { + return description; + } + + public static DocumentsEnum valueOfLink(String label) { + DocumentsEnum value = null; + + for (DocumentsEnum documentsEnum : DocumentsEnum.values()) { + if (label.equals(documentsEnum.fileName)) { + value = documentsEnum; + break; + } + } + return value; + } + +} diff --git a/lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java b/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java similarity index 58% rename from lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java rename to lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java index 0c9936d..e7c8b51 100644 --- a/lima-swing/src/test/java/org/chorem/lima/ui/report/ReportTest.java +++ b/lima-web/src/test/java/org/chorem/lima/web/action/ReportTest.java @@ -1,4 +1,4 @@ -package org.chorem.lima.ui.report; +package org.chorem.lima.web.action; /* * #%L @@ -22,35 +22,41 @@ package org.chorem.lima.ui.report; * #L% */ +import com.google.common.collect.Lists; import net.sf.jasperreports.engine.JRException; -import org.chorem.lima.ui.AbstractLimaTest; +import org.chorem.lima.business.api.report.BalanceBeanReportService; +import org.chorem.lima.business.ejb.report.BalanceBeanReportServiceImpl; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import java.io.IOException; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; /** * Created by davidcosse on 02/10/14. */ -public class ReportTest extends AbstractLimaTest{ +public class ReportTest { String tmpDir; + protected static String DATE_FORMAT = "dd/MM/yyyy"; + @Before public void initTest() throws Exception { - initTestDefaultAccounts(); tmpDir = System.getProperty("java.io.tmpdir")+"/"; } + @Ignore @Test - public void testAccountReport() throws JRException, IOException { - ReportBuilder builder = new ReportBuilder(); - builder.generateAccountReport(tmpDir + "AccountReport.pdf"); - } - - @Test - public void testBalanceReport() throws JRException, IOException { - ReportBuilder builder = new ReportBuilder(); - builder.generateBalanceReport(tmpDir + "BalanceReport.pdf"); + public void testBalanceReport() throws JRException, IOException, ParseException { + DateFormat df = new SimpleDateFormat(DATE_FORMAT); + Date beginDateFormat = df.parse("01/01/2013"); + Date endDateFormat = df.parse("31/12/2014"); + DocumentService documentService = new DocumentService(); + documentService.buildGeneralEntryBooksDocuments(beginDateFormat, endDateFormat, null); } } diff --git a/pom.xml b/pom.xml index 0bef794..5d82f3a 100644 --- a/pom.xml +++ b/pom.xml @@ -140,6 +140,7 @@ <module>lima-business-api</module> <module>lima-business</module> <module>lima-swing</module> + <module>lima-web</module> </modules> <scm> @@ -180,8 +181,8 @@ <nuitonProfilingVersion>3.0</nuitonProfilingVersion> <nuitonCsvVersion>3.0-rc-4</nuitonCsvVersion> <nuitonConverterVersion>1.0</nuitonConverterVersion> - <eugeneVersion>3.0-SNAPSHOT</eugeneVersion> - <topiaVersion>3.0-SNAPSHOT</topiaVersion> + <eugeneVersion>2.13</eugeneVersion> + <topiaVersion>3.0-beta-14</topiaVersion> <nuitonI18nVersion>3.3</nuitonI18nVersion> <swinglabsVersion>3.0.4</swinglabsVersion> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm