branch feature/1241-account-report updated (4d8c038 -> 7f54c9e)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git discards 4d8c038 refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe discards d720088 refs #1241 Ajout de traductions discards cc97996 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. discards a6dc46e refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. discards 40e00d3 refs #1241 refactoring de code discards f050c53 refs #1241 monté de version je Jasper report discards 8bbd193 refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) discards 020a06a refs #1241 internationalisation sur le rapport de compte discards ebb41e3 refs #1241 internationalisation sur le rapport de compte discards 4f2401d refs #1241 minor discards fba47bc refs #1241mise à jour du plan de tva discards 395e868 refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports discards 5f895d0 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima discards 4a69da5 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. discards a425ed4 refs #1241 pas de changement dans l'interface de configuration du premier lancement discards fe905c0 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider discards 72f2b43 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité discards 188aba6 refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA discards 6a11e19 refs #1241 mise à jour du plan de TVA discards 96ac3b6 refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données discards 36b2f8b refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports discards 87a14e5 refs #1241 refactoring discards 0a807d2 refs #1241 correction sur nom de police discards 8238eb1 refs #1241 factorisation du code source Jasper, utilisation de style discards 901a044 refs #1241 modification de l'affichage des infos discards c93c0d5 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné discards 92fe79e refs #1241 gérération des rapport de compte avec Jasper discards 84f9f52 refs #1241 gérération des rapport de compte avec Jasper adds 34f7074 refs #1240 ajout de controles adds 0112481 refs #1290 A la création d'une transaction si aucune n'a été créée lors de la même session est qu'une transaction est sélectionnée alors la nouvelle trasaction prend la date de celle-ci adds d100451 refs #1289 calcul de la colonne Solde dans l'onglet recherche des entrées adds acefd82 refs #1289refactoring adds 32aa3f8 refs #1289 Le solde est positif si le solde est débiteur adds 13b9893 Merge branch 'feature/1289-SearchEntriescomputeSold' into develop adds 26111c4 refs #1293 "Onglet Saisie des écritures" La saisie dans le champ jour est dirrectement prise en compte adds 54e25dd refs #1293 Auto selection du compte si un seul compte correspond à la recherche adds 785fc80 refs #1295 Même objet sélectionné entre la combobox et le model adds c51843f Merge branch 'feature/1295-improveEditEntryView' into develop adds 2d2c8a4 refs #1241 ordonne les entrée par date adds 8ef9bf6 refs #1286 Regrouppement des entrées par pièces comptable dans la saisie d'écriture adds bce1075 refs #1286 La solution adopter n'est pas idéale, il faudra revoir le model pour ordonnée les entrée d'une transaction voir ref #1207 adds 4bbfd4d Merge branch 'feature/1286-ordered-entries' into develop adds 636a5ba refs #1242 verifivation que l'on filtre bien sur un compte adds ae8502c fixes #1243 la sortie du champ date ou le clic sur une autre action entraine bien la prise en compte des dates saisies adds 2dc6345 refs #1242 Modification pour plus de lisibilité suite à revue de code Kevin adds 79ebf7d refs #1242 Refactoring pour plus de lisibilité adds 4d8ac91 refs #1242 correction de merge adds 7288ae1 Merge branch 'feature/1242-no-account-research-exception' into develop adds 9fd0c2f refs #1297correction pour ne pas remonter les entitées ayant une date > à celle indiquée dans la période adds bde8128 refs #1298 corrige NPE dans le cas ou aucune donnée existe adds e3d95f9 refs #1242 ordre des traductions revu adds d9b4a7d Merge branch 'feature/1298-FixNPE' into develop adds 959bbc3 refs #1268 l'interface de saisie d'un plan de TVA est de nouveau fonctionnelle adds 6b2e99c refs #1268 utilisation de JXTreeTable à la place de VatChartTreeTable adds 73a9813 refs #1268 déplacement du ListSelectionModel dans le handler adds b44dada Merge branch 'feature/1268-vat-statement-usable' into develop adds 635828d refs #1242 correction sur refactoring adds a0857b1 Mise à jour de la déclaration de licences adds d5f467a refs #1295 Le tableau de la saisie des écritures n'est pas éditable si la période est cloturé pour le journal sélectionné adds 4a1b1d5 refs #1158 Ajout de commentaires + désactivation du boutton de création d'une transaction adds 253998b refs #1158 Sur l'onglet lettrage il n'est pas possible de modifier une selection comportant une entrée vérouillée. Ajout d'une colonne 'clos' indiquant les entrées vérouillées. adds 9957610 Merge branch 'feature/1158-NotEditableTableForClose' into develop adds b4b645f refs #1158 : recupération du ClosedPeriodEntryBook et stockage dans un map pour le cache. adds b119160 import manquant adds 7cd3ef3 correction suite au merge adds fd35125 Merge branch 'feature/1158' into develop new f0e4f29 refs #1241 gérération des rapport de compte avec Jasper new 03e84c6 refs #1241 gérération des rapport de compte avec Jasper new 4c16fcb refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné new e9c8126 refs #1241 modification de l'affichage des infos new ce734ff refs #1241 factorisation du code source Jasper, utilisation de style new 643e3a5 refs #1241 correction sur nom de police new 9afd18d refs #1241 refactoring new b019126 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports new 8b18d5e refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données new dedb5b9 refs #1241 mise à jour du plan de TVA new 9a297ab refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA new f56fee1 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité new cfd3f21 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider new 797522f refs #1241 pas de changement dans l'interface de configuration du premier lancement new 9c2a471 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. new 6c63783 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima new 7cc39ee refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports new b4373cd refs #1241mise à jour du plan de tva new 21cbf77 refs #1241 minor new e8e622e refs #1241 internationalisation sur le rapport de compte new 5a144b5 refs #1241 internationalisation sur le rapport de compte new 887373c refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) new b8a6ceb refs #1241 monté de version je Jasper report new 6f487bf refs #1241 refactoring de code new 1179c09 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. new 4e94d24 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. new 0919fa5 refs #1241 Ajout de traductions new 7f54c9e refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (4d8c038) \ N -- N -- N refs/heads/feature/1241-account-report (7f54c9e) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 28 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 7f54c9e7f90cea3d576e8d2c44c05a69f89b7b0c Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 15:00:36 2015 +0200 refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe commit 0919fa58b571e38dedb5d0b604f2e5fa44e5dc1f Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:44:30 2015 +0200 refs #1241 Ajout de traductions commit 4e94d244f52771c681529ceda1a781cb914ec610 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:35:19 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. commit 1179c093d61c0c745d73f11a86f658066f078421 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:34:40 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. commit 6f487bfcfab4a1c2775746c314e14b9387992465 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 9 15:21:41 2015 +0200 refs #1241 refactoring de code commit b8a6ceb2670186b6b079c3b7ed4b8140dedec6ba Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:50 2015 +0200 refs #1241 monté de version je Jasper report commit 887373c77477f6f7919b0c05009b679ca385de4d Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:30 2015 +0200 refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) commit 5a144b57c3704298550de84c67656d0da796ab55 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:41 2015 +0200 refs #1241 internationalisation sur le rapport de compte commit e8e622ed5486d9932ddd4fbc6bf5fd3d72e1c08c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:14 2015 +0200 refs #1241 internationalisation sur le rapport de compte commit 21cbf7748f6e2fedbd3a0f22e8e8971258a3fa64 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:14:52 2015 +0200 refs #1241 minor commit b4373cd69ed0adc9b183349ad0a7577386e3a687 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:13:36 2015 +0200 refs #1241mise à jour du plan de tva commit 7cc39ee6473b0d5c64fca2ecbeb0ccf706b828a0 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 30 17:10:33 2015 +0200 refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports commit 6c63783fdab3a94f352d996d8cbf3965385372a3 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:48:02 2015 +0200 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima commit 9c2a4711664117acab90fef3eff32bca36d1d76b Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:42:15 2015 +0200 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. commit 797522fb4be6b4621d5e239c17e4a937dab1ebce Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:24:55 2015 +0200 refs #1241 pas de changement dans l'interface de configuration du premier lancement commit cfd3f21f337b317721a4c5a783c1d7edfd0a4d82 Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:15:46 2015 +0200 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider commit f56fee1b2f0b1e6c4f68e4a2f3bde6399ed40c1f Author: dcosse <cosse@codelutin.com> Date: Fri Jul 24 18:29:55 2015 +0200 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité commit 9a297abd96f72ce21857cec80d89618097081050 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 23 18:47:02 2015 +0200 refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA commit dedb5b9517d25302a35dc92a8be287b3596dd678 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 22 10:18:41 2015 +0200 refs #1241 mise à jour du plan de TVA commit 8b18d5e8b4dc9168960b1f7d4062cadd11386ebf Author: dcosse <cosse@codelutin.com> Date: Mon Jul 20 09:53:04 2015 +0200 refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données commit b01912625c723f6e6274b5453fc1fe6b0f708469 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 7 16:41:55 2015 +0200 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports commit 9afd18d63faa9b966fc50beda3e2573cc7fd47b3 Author: dcosse <cosse@codelutin.com> Date: Fri Jul 3 18:24:09 2015 +0200 refs #1241 refactoring commit 643e3a559e055debe3110b43c172ba111342d10b Author: dcosse <cosse@codelutin.com> Date: Thu Jul 2 15:08:14 2015 +0200 refs #1241 correction sur nom de police commit ce734ffebd6f09260dd5f220a56d109ba17ef245 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 1 17:42:23 2015 +0200 refs #1241 factorisation du code source Jasper, utilisation de style commit e9c81264aac8c378b8df4146415b17e623c6d065 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 12:05:27 2015 +0200 refs #1241 modification de l'affichage des infos commit 4c16fcbfa4fd587e9a5cbfcce97a5ece73ed0864 Author: dcosse <cosse@codelutin.com> Date: Mon Jun 29 10:14:15 2015 +0200 refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné commit 03e84c68bbffd4caeefa3c9d4dbd43721789d942 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:53:48 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper commit f0e4f29b522a5df7483ca49cc5e1a278f290dbd9 Author: dcosse <cosse@codelutin.com> Date: Sat Jun 27 00:52:55 2015 +0200 refs #1241 gérération des rapport de compte avec Jasper Summary of changes: .../org/chorem/lima/business/ServiceListener.java | 2 +- .../api/ClosedPeriodicEntryBookService.java | 3 + .../business/api/FinancialTransactionService.java | 7 + .../lima/business/api/VatStatementService.java | 5 +- ...on.java => AlreadyAffectedVatBoxException.java} | 14 +- ...lException.java => RequiredFieldException.java} | 14 +- .../lima/business/ejb/AccountServiceImpl.java | 2 - .../ejb/ClosedPeriodicEntryBookServiceImpl.java | 11 + .../ejb/FinancialTransactionServiceImpl.java | 14 +- .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../lima/business/ejb/VatStatementServiceImpl.java | 74 ++-- .../entity/ClosedPeriodicEntryBookTopiaDao.java | 29 +- .../java/org/chorem/lima/entity/EntryTopiaDao.java | 43 ++- lima-swing/src/license/THIRD-PARTY.properties | 1 + .../chorem/lima/enums/VatStatementsChartEnum.java | 5 +- .../AccountCondition/AccountConditionHandler.java | 6 +- .../ui/Filter/dateCondition/DateConditionView.jaxx | 2 +- .../DateIntervalConditionView.jaxx | 7 +- .../chorem/lima/ui/account/AccountViewHandler.java | 3 +- .../lima/ui/celleditor/AccountTableCellEditor.java | 28 +- .../lima/ui/celleditor/DayTableCellEditor.java | 30 +- .../lima/ui/combobox/EntryBookComboBoxModel.java | 4 +- .../ui/combobox/FiscalPeriodComboBoxModel.java | 4 +- .../ui/common/FinancialTransactionTableModel.java | 111 +++++- .../lima/ui/entrybook/EntryBookViewHandler.java | 8 +- .../ui/financialtransaction/AccountColumn.java | 55 ++- .../ui/financialtransaction/BalanceColumn.java | 35 +- .../lima/ui/financialtransaction/DayColumn.java | 6 +- .../FinancialTransactionView.css | 15 +- .../FinancialTransactionView.jaxx | 2 +- .../FinancialTransactionViewHandler.java | 95 +++-- .../FinancialTransactionSearchTableModel.java | 12 +- .../FiscalControlExportViewHandler.java | 2 +- .../ui/fiscalperiod/FiscalPeriodViewHandler.java | 4 +- .../java/org/chorem/lima/ui/home/AccountsPane.java | 6 +- .../org/chorem/lima/ui/home/EntryBooksPane.java | 8 +- .../lima/ui/home/FinancialTransactionsPane.java | 6 +- .../org/chorem/lima/ui/home/FiscalYearsPane.java | 10 +- .../lima/ui/lettering/LetteringEditModel.java | 80 ++-- ...tionModel.java => LetteringSelectionModel.java} | 31 +- .../lima/ui/lettering/LetteringTableModel.java | 38 ++ .../org/chorem/lima/ui/lettering/LetteringView.css | 6 +- .../chorem/lima/ui/lettering/LetteringView.jaxx | 2 +- .../lima/ui/lettering/LetteringViewHandler.java | 85 +++-- .../chorem/lima/ui/opening/OpeningViewHandler.java | 4 +- .../lima/ui/vatchart/VatChartMovementForm.css | 2 + .../lima/ui/vatchart/VatChartMovementForm.jaxx | 19 +- .../chorem/lima/ui/vatchart/VatChartTreeTable.java | 134 ------- .../lima/ui/vatchart/VatChartTreeTableModel.java | 226 ------------ .../org/chorem/lima/ui/vatchart/VatChartView.jaxx | 26 +- .../lima/ui/vatchart/VatChartViewHandler.java | 401 +++++++++++++-------- .../chorem/lima/ui/vatchart/VatChartViewModel.java | 191 ++++++++++ .../resources/i18n/lima-swing_en_GB.properties | 8 + .../resources/i18n/lima-swing_fr_FR.properties | 12 +- .../icons/action-financialPeriod-close.png | Bin 715 -> 452 bytes .../src/main/resources/import/vat_developed.csv | 56 --- .../src/main/resources/import/vat_shortened.csv | 56 --- lima-swing/src/main/resources/log4j.properties | 2 +- pom.xml | 2 +- 59 files changed, 1144 insertions(+), 937 deletions(-) copy lima-business-api/src/main/java/org/chorem/lima/business/exceptions/{NotAllowedLabelException.java => AlreadyAffectedVatBoxException.java} (74%) copy lima-business-api/src/main/java/org/chorem/lima/business/exceptions/{NotAllowedLabelException.java => RequiredFieldException.java} (74%) copy lima-business-api/src/main/java/org/chorem/lima/LimaTechnicalException.java => lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DayTableCellEditor.java (64%) rename lima-swing/src/main/java/org/chorem/lima/ui/lettering/{LettringSelectionModel.java => LetteringSelectionModel.java} (82%) delete mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java delete mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java create mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewModel.java delete mode 100644 lima-swing/src/main/resources/import/vat_developed.csv delete mode 100644 lima-swing/src/main/resources/import/vat_shortened.csv -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit dedb5b9517d25302a35dc92a8be287b3596dd678 Author: dcosse <cosse@codelutin.com> Date: Wed Jul 22 10:18:41 2015 +0200 refs #1241 mise à jour du plan de TVA --- lima-swing/src/main/resources/import/vat_default.csv | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lima-swing/src/main/resources/import/vat_default.csv b/lima-swing/src/main/resources/import/vat_default.csv index 70f92ee..4da2dfb 100644 --- a/lima-swing/src/main/resources/import/vat_default.csv +++ b/lima-swing/src/main/resources/import/vat_default.csv @@ -23,7 +23,9 @@ Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PA Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b19;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Base hors taxe);N;;b20;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Taxe due);N;;b21;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM @@ -45,6 +47,8 @@ Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA D Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Sommes à imputer, y compris acompte congés (exprimées en euro);N;;b42;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Indiquer ici le coefficient de taxation forfaitaire;N;;taux;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER @@ -56,4 +60,4 @@ TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER -Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER \ No newline at end of file +Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 9a297abd96f72ce21857cec80d89618097081050 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 23 18:47:02 2015 +0200 refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA --- .../chorem/lima/business/api/TreasuryService.java | 13 + .../lima/business/ejb/TreasuryServiceImpl.java | 69 ++++++ .../lima/business/ejb/csv/IdentityModel.java | 4 +- .../resources/i18n/lima-business_fr_FR.properties | 2 + .../V0_8_6_0__1241_create_table_TREASURY.sql | 54 ++++ .../src/main/xmi/lima-callao-model.properties | 2 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 59242 -> 60092 bytes .../lima/report/service/DocumentService.java | 63 +++-- .../java/org/chorem/lima/ui/MainViewHandler.java | 13 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 149 +++++++++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 274 ++++++++++++++------- .../chorem/lima/ui/identity/IdentityHandler.java | 32 ++- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 95 ++++++- .../lima/ui/opening/CreateIdentityPanel.jaxx | 105 +++++++- .../ui/opening/CreateIdentityPanelHandler.java | 16 +- .../resources/i18n/lima-swing_en_GB.properties | 13 + .../resources/i18n/lima-swing_fr_FR.properties | 15 +- .../src/main/resources/import/vat_default.csv | 4 +- 18 files changed, 736 insertions(+), 187 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java new file mode 100644 index 0000000..4551d55 --- /dev/null +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java @@ -0,0 +1,13 @@ +package org.chorem.lima.business.api; + +import org.chorem.lima.entity.Treasury; + +/** + * Created by davidcosse on 22/07/15. + */ +public interface TreasuryService { + + Treasury getTreasury(); + + Treasury updateTreasury(Treasury treasury); +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java new file mode 100644 index 0000000..3a7cf26 --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java @@ -0,0 +1,69 @@ +package org.chorem.lima.business.ejb; + +import com.google.common.base.Preconditions; +import org.chorem.lima.business.api.TreasuryService; +import org.chorem.lima.entity.Treasury; +import org.chorem.lima.entity.TreasuryTopiaDao; +import org.nuiton.util.beans.Binder; +import org.nuiton.util.beans.BinderFactory; + +import javax.ejb.Remote; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import java.util.List; + +/** + * Created by davidcosse on 22/07/15. + */ +@Stateless +@Remote(TreasuryService.class) +@TransactionAttribute +public class TreasuryServiceImpl extends AbstractLimaService implements TreasuryService { + + @Override + public Treasury getTreasury() { + Treasury treasury; + + TreasuryTopiaDao dao = getDaoHelper().getTreasuryDao(); + List<Treasury> treasuries = dao.findAll(); + if (treasuries.size() == 0) { + treasury = dao.create( + Treasury.PROPERTY_ADDRESS, "", + Treasury.PROPERTY_ZIP_CODE, "", + Treasury.PROPERTY_CITY, "", + Treasury.PROPERTY_SYSTEM_TYPE, "", + Treasury.PROPERTY_DOSSIER_NUMBER, "", + Treasury.PROPERTY_KEY, "", + Treasury.PROPERTY_CDI, "", + Treasury.PROPERTY_SERVICE_CODE, "" + ); + } else { + treasury = treasuries.get(0); + } + return treasury; + } + + @Override + public Treasury updateTreasury(Treasury treasury) { + Preconditions.checkArgument(treasury != null); + + Treasury originalTreasury = getTreasury(); + + bindData(treasury, originalTreasury); + + Treasury updatedTreasury = doUpdate(originalTreasury); + + return updatedTreasury; + } + + protected Treasury doUpdate(Treasury originalTreasury) { + TreasuryTopiaDao dao = getDaoHelper().getTreasuryDao(); + return dao.update(originalTreasury); + } + + protected void bindData(Treasury treasury, Treasury originalTreasury) { + Binder<Treasury, Treasury> binder = BinderFactory.newBinder(Treasury.class); + binder.copyExcluding(treasury, originalTreasury, + Treasury.PROPERTY_TOPIA_ID); + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java index 719582f..9a2a80b 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/csv/IdentityModel.java @@ -43,7 +43,7 @@ public class IdentityModel extends AbstractLimaModel<Identity> implements Export newOptionalColumn("phoneNumber", Identity.PROPERTY_PHONE_NUMBER); newOptionalColumn("email", Identity.PROPERTY_EMAIL); newOptionalColumn("zipCode", Identity.PROPERTY_ZIP_CODE); - newOptionalColumn("vatNumber", Identity.PROPERTY_VAT_NUMBER); + //newOptionalColumn("vatNumber", Identity.PROPERTY_VAT_NUMBER); newOptionalColumn("classificationCode", Identity.PROPERTY_CLASSIFICATION_CODE); newOptionalColumn("buisinessNumber", Identity.PROPERTY_BUSINESS_NUMBER); } @@ -59,7 +59,7 @@ public class IdentityModel extends AbstractLimaModel<Identity> implements Export modelBuilder.newColumnForExport("phoneNumber", Identity.PROPERTY_PHONE_NUMBER); modelBuilder.newColumnForExport("email", Identity.PROPERTY_EMAIL); modelBuilder.newColumnForExport("zipCode", Identity.PROPERTY_ZIP_CODE); - modelBuilder.newColumnForExport("vatNumber", Identity.PROPERTY_VAT_NUMBER); + //modelBuilder.newColumnForExport("vatNumber", Identity.PROPERTY_VAT_NUMBER); modelBuilder.newColumnForExport("classificationCode", Identity.PROPERTY_CLASSIFICATION_CODE); modelBuilder.newColumnForExport("buisinessNumber", Identity.PROPERTY_BUSINESS_NUMBER); return (Iterable) modelBuilder.getColumnsForExport(); diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 778321c..da69ed6 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -39,7 +39,9 @@ lima-business.document.society=Nom lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur +lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA +lima-business.document.vatPeriod1=%1$tM %1$tY lima-business.document.vatnumber=N° TVA lima-business.document.voucher=Pièce comptable lima-business.document.zipcode=Code postal diff --git a/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql b/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql new file mode 100644 index 0000000..644dddd --- /dev/null +++ b/lima-callao/src/main/resources/db/migration/V0_8_6_0__1241_create_table_TREASURY.sql @@ -0,0 +1,54 @@ +--- +-- #%L +-- Lima :: callao +-- %% +-- Copyright (C) 2008 - 2015 CodeLutin +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- + -- migration Lima data base from 0.6 to 0.8.6 + +-- migration from h2 to 1.3.166 not supporting index on clob +--CREATE TABLE TREASURY ( +-- TOPIAID varchar (255), +-- TOPIAVERSION bigint(19), +-- TOPIACREATEDATE timestamp(23), +-- ADDRESS varchar (255), +-- ADDRESS2 varchar (255), +-- CDI varchar (2), +-- CITY varchar (30), +-- KEY varchar (2), +-- SERVICECODE varchar (3), +-- SIE varchar (7), +-- SYSTEMTYPE varchar (3), +-- VATNUMBER varchar (6), +-- ZIPCODE varchar (5) +--); +CREATE TABLE TREASURY ( + TOPIAID varchar (255), + TOPIAVERSION bigint(19), + TOPIACREATEDATE timestamp(23), + DOSSIERNUMBER varchar (30), + ADDRESS varchar (255), + ADDRESS2 varchar (255), + ZIPCODE varchar (30), + CITY varchar (30), + CDI varchar (30), + KEY varchar (30), + SERVICECODE varchar (30), + SIE varchar (30), + SYSTEMTYPE varchar (30) +); \ No newline at end of file diff --git a/lima-callao/src/main/xmi/lima-callao-model.properties b/lima-callao/src/main/xmi/lima-callao-model.properties index c8a2519..88531f1 100644 --- a/lima-callao/src/main/xmi/lima-callao-model.properties +++ b/lima-callao/src/main/xmi/lima-callao-model.properties @@ -21,7 +21,7 @@ ### # Precise l'entete de l'ensemble des fichiers generes model.tagvalue.copyright=/*\n Copyright (C) 2009-2012 Lima Callao\n */ -model.tagvalue.version=0.6 +model.tagvalue.version=0.8.6.0 model.tagvalue.constantPrefix=PROPERTY_ model.tagValue.notGenerateToString=true model.tagValue.hibernateAttributeType.String=text diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 8633e8e..4bb153c 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 982a34e..40ef663 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -24,8 +24,6 @@ package org.chorem.lima.report.service; import com.google.common.base.Strings; import com.google.common.collect.Lists; -import com.itextpdf.text.pdf.AcroFields; -import com.itextpdf.text.pdf.PdfReader; import net.sf.jasperreports.engine.JasperReport; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -40,6 +38,7 @@ import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.business.api.OptionsService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.business.api.report.AccountReportService; import org.chorem.lima.business.api.report.BalanceReportService; @@ -49,6 +48,7 @@ import org.chorem.lima.business.api.report.ProvisionalEntryBookReportService; import org.chorem.lima.business.utils.BigDecimalToString; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Identity; +import org.chorem.lima.entity.Treasury; import org.chorem.lima.entity.VatStatement; import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; @@ -65,7 +65,6 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Set; import static org.nuiton.i18n.I18n.t; @@ -74,21 +73,23 @@ public class DocumentService { protected static final Log log = LogFactory.getLog(DocumentService.class); - private IdentityService identityService; - - private FinancialStatementService financialStatementService; + protected AccountService accountService; protected AccountReportService accountReportService; protected BalanceReportService balanceReportService; + protected ProvisionalEntryBookReportService entryBookReportService; + + protected FinancialStatementService financialStatementService; + protected GeneralEntryBookReportService generalEntryBookReportService; - protected ProvisionalEntryBookReportService entryBookReportService; + protected IdentityService identityService; protected LedgerReportService ledgerReportService; - protected AccountService accountService; + protected TreasuryService treasuryService; protected VatStatementService vatStatementService; @@ -102,14 +103,15 @@ public class DocumentService { protected String vat_default_formFilePath; public DocumentService() { - identityService = LimaServiceFactory.getService(IdentityService.class); - financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); accountService = LimaServiceFactory.getService(AccountService.class); - accountReportService = LimaServiceFactory.getService(AccountReportService.class); balanceReportService = LimaServiceFactory.getService(BalanceReportService.class); - generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); entryBookReportService = LimaServiceFactory.getService(ProvisionalEntryBookReportService.class); + financialStatementService = LimaServiceFactory.getService(FinancialStatementService.class); + generalEntryBookReportService = LimaServiceFactory.getService(GeneralEntryBookReportService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); + ledgerReportService = LimaServiceFactory.getService(LedgerReportService.class); vatStatementService = LimaServiceFactory.getService(VatStatementService.class); @@ -289,20 +291,10 @@ public class DocumentService { String vatPDFUrl = LimaReportConfig.getInstance().getVatPDFUrl(); - AcroFields pdfFields; if (vatPDFUrl.equals("default")) { reportsStream = DocumentService.class.getResourceAsStream("/reports/vat_form_fr.pdf"); - try { - PdfReader reader = new PdfReader("/reports/vat_form_fr.pdf"); - pdfFields = reader.getAcroFields(); - Set<String> fldNames = pdfFields.getFields().keySet(); - - } catch (IOException e) { - e.printStackTrace(); - } if (reportsStream == null) { - throw new LimaTechnicalException("Could not find such file " - + "/reports/vat_form_fr.pdf"); + throw new LimaTechnicalException("Could not find such file " + "/reports/vat_form_fr.pdf"); } } else { try { @@ -340,6 +332,25 @@ public class DocumentService { fields.setField(doc, vatStatement.getBoxName(), amount.toString()); } } + + Identity identity = identityService.getIdentity(); + Treasury treasury = treasuryService.getTreasury(); + + String ident = identity.getName() + "\n" + identity.getAddress() + "\n" + identity.getAddress2() + "\n" + identity.getZipCode() + " " + identity.getCity(); + String treasuryAddress = treasury.getAddress() + '\n' + treasury.getZipCode() + " " + treasury.getCity(); + + fields.setField(doc, "a1", t("lima-business.document.vatPeriod1", beginDate)); + fields.setField(doc, "a2", treasuryAddress); + fields.setField(doc, "a4", ident); + fields.setField(doc, "a6", treasury.getSie()); + fields.setField(doc, "a7", treasury.getDossierNumber()); + fields.setField(doc, "a8", treasury.getKey()); + fields.setField(doc, "a9", t("lima-business.document.treasuryPeriod", beginDate)); + fields.setField(doc, "a10", treasury.getCdi()); + fields.setField(doc, "a11", treasury.getServiceCode()); + fields.setField(doc, "a12", treasury.getSystemType()); + fields.setField(doc, "a13", "FR" + identity.getVatNumber() + identity.getBusinessNumber()); + } } @@ -425,9 +436,9 @@ public class DocumentService { boldItalicEnd, "<i>" + (StringUtils.isNotEmpty(identity.getClassificationCode()) ? identity.getClassificationCode() : " - ") + "</i>"}; headerTitle += constructTableLine(columnsClassifCode); - String[] columnsVatNumber = {boldItalicBegin + t("lima-business.document.vatnumber") + boldItalicEnd, - "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>",}; - headerTitle += constructTableLine(columnsVatNumber); +// String[] columnsVatNumber = {boldItalicBegin + t("lima-business.document.vatnumber") + boldItalicEnd, +// "<i>" + (StringUtils.isNotEmpty(identity.getVatNumber()) ? identity.getVatNumber() : " - ") + "</i>",}; +// headerTitle += constructTableLine(columnsVatNumber); } String[] columnsPeriodOne = {boldItalicBegin + t("lima-business.document.period1") + boldItalicEnd, "<i>" diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java index 8b53397..2d1d1e4 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java @@ -52,19 +52,12 @@ import org.chorem.lima.ui.vatchart.VatChartView; import org.nuiton.util.DesktopUtil; import org.nuiton.widget.SwingSession; -import javax.swing.DefaultCellEditor; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JEditorPane; -import javax.swing.JScrollPane; -import javax.swing.JTabbedPane; -import javax.swing.UIManager; +import javax.swing.*; import javax.swing.border.LineBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.BorderUIResource; -import java.awt.Component; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; @@ -554,7 +547,7 @@ public class MainViewHandler { boolean canClose) { final JTabbedPane contentTabbedPane = ui.getContentTabbedPane(); - // if contentTabbedPane doesnot yet contains tab + // if contentTabbedPane does not yet contains tab if (contentTabbedPane.indexOfTab(name) == -1) { ClosableTabHeader closableHeader = new ClosableTabHeader(); closableHeader.setTitle(name); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index 8675205..c46af39 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -30,7 +30,7 @@ } #nameTextField { - text : {handler.getIdentity().getName()}; + text : {identity.getName()}; columns : 20; } @@ -39,8 +39,9 @@ } #descriptionTextField { - text : {handler.getIdentity().getDescription()}; + text : {identity.getDescription()}; columns : 30; + rows : 5; } #addressLabel { @@ -48,13 +49,9 @@ } #addressTextField { - text : {handler.getIdentity().getAddress()}; - columns : 30; -} - -#address2TextField { - text : {handler.getIdentity().getAddress2()}; + text : {identity.getAddress()}; columns : 30; + rows : 5; } #zipCodeLabel { @@ -62,7 +59,7 @@ } #zipCodeTextField { - text : {handler.getIdentity().getZipCode()}; + text : {identity.getZipCode()}; columns : 5; } @@ -71,7 +68,7 @@ } #cityTextField { - text : {handler.getIdentity().getCity()}; + text : {identity.getCity()}; columns : 20; } @@ -80,16 +77,7 @@ } #businessNumberTextField { - text : {handler.getIdentity().getBusinessNumber()}; - columns : 20; -} - -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; + text : {identity.getBusinessNumber()}; columns : 20; } @@ -98,7 +86,7 @@ } #classificationCodeTextField { - text : {handler.getIdentity().getClassificationCode()}; + text : {identity.getClassificationCode()}; columns : 5; } @@ -107,7 +95,7 @@ } #phoneNumberTextField { - text : {handler.getIdentity().getPhoneNumber()}; + text : {identity.getPhoneNumber()}; columns : 20; } @@ -116,10 +104,123 @@ } #emailTextField { - text : {handler.getIdentity().getEmail()}; + text : {identity.getEmail()}; columns : 20; } +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {identity.getVatNumber()}; + columns : 2; +} + +#treasuryAddressLabel { + text : "lima.treasury.address"; +} + +#treasuryAddressTextField { + text : {treasury.getAddress()}; + columns : 30; + rows : 5; +} + +#treasuryAddress2Label { + text : "lima.treasury.address2"; +} + +#address2TextField { + text : {treasury.getAddress2()}; + columns : 30; +} + +#treasuryZipCodeLabel { + text : "lima.treasury.zipCode"; +} + +#treasuryZipCodeTextField { + text : {treasury.getZipCode()}; + columns : 5; +} + +#treasuryCityLabel { + text : "lima.treasury.city"; +} + +#treasuryCityTextField { + text : {treasury.getCity()}; + columns : 20; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySystemTypeTextField { + text : {treasury.getSystemType()}; + columns : 3; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySieTextField { + text : {treasury.getSie()}; + columns : 7; +} + +#treasurySieLabel { + text : "lima.treasury.sie"; +} + +#treasuryVatNumberTextField { + text : {treasury.getVatNumber()}; + columns : 6; +} + +#treasuryVatNumberLabel { + text : "lima.treasury.vatNumber"; +} + +#treasuryKeyTextField { + text : {treasury.getKey()}; + columns : 2; +} + +#treasuryKeyLabel { + text : "lima.treasury.key"; +} + +#treasuryCdiTextField { + text : {treasury.getKey()}; + columns : 2; +} + +#treasuryCdiLabel { + text : "lima.treasury.cdi"; +} + +#treasuryServiceCodeTextField { + text : {treasury.getServiceCode()}; + columns : 3; +} + +#treasuryServiceCodeLabel { + text : "lima.treasury.serviceCode"; +} + +#dossierNumberLabel { + text : "lima.treasury.dossierNumber"; +} + +#dossierNumberTextField { + text : {treasury.getDossierNumber()}; + columns : 3; +} + #cancel { text : "lima.cancel"; actionIcon : cancel; @@ -128,4 +229,4 @@ #ok { text : "lima.ok"; actionIcon : ok; -} +} \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index b050d35..9d53d7f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -27,6 +27,8 @@ <IdentityHandler id="handler" javaBean="new IdentityHandler(this)"/> <org.chorem.lima.entity.Identity id="identity" javaBean='handler.getIdentity()'/> + <org.chorem.lima.entity.Treasury id="treasury" + javaBean='handler.getTreasury()'/> <import> java.awt.Dimension </import> @@ -37,101 +39,183 @@ ]]> </script> - <Table constraints="BorderLayout.CENTER" - border="{BorderFactory.createEmptyBorder(10, 10, 10, 10)}" > - <row> - <cell anchor="east"> - <JLabel id="nameLabel" /> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="nameTextField" /> - </cell> - - <cell rows="5"> - <JPanel minimumSize="{new Dimension(20, 20)}"> - </JPanel> - </cell> - - <cell anchor="east"> - <JLabel id="phoneNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="phoneNumberTextField"/> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="descriptionLabel"/> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="descriptionTextField"/> - </cell> - - <cell anchor="east"> - <JLabel id="emailLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="emailTextField" /> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="addressLabel"/> - </cell> - <cell anchor="west" - columns="3"> - <JTextField id="addressTextField" /> - </cell> - - <cell anchor="east"> - <JLabel id="businessNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="businessNumberTextField"/> - </cell> - </row> - - <row> - <cell/> - <cell anchor="west" - columns="3"> - <JTextField id="address2TextField"/> - </cell> - - <cell anchor="east"> - <JLabel id="vatNumberLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="vatNumberTextField"/> - </cell> - </row> - - <row> - <cell anchor="east"> - <JLabel id="zipCodeLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="zipCodeTextField"/> - </cell> - <cell anchor="east"> - <JLabel text="lima.identity.city"/> - </cell> - <cell fill="horizontal"> - <JTextField id="cityTextField" /> - </cell> - - <cell anchor="east"> - <JLabel id="classificationCodeLabel"/> - </cell> - <cell anchor="west"> - <JTextField id="classificationCodeTextField"/> - </cell> - </row> - </Table> + <JTabbedPane id="identityContentTabbedPane" + constraints="BorderLayout.CENTER"> + + <tab id="identityTab" title="Identité" layout='{new GridLayout(0,1)}'> + <Table id="identityTable"> + <row> + <cell anchor="east"> + <JLabel id="nameLabel" /> + </cell> + <cell anchor="west"> + <JTextField id="nameTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="phoneNumberLabel"/> + </cell> + <cell anchor="west" > + <JTextField id="phoneNumberTextField"/> + </cell> + </row> + + <row> + <cell anchor="east" rows="5"> + <JLabel id="addressLabel"/> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="addressTextField" /> + </cell> + </row> + + <row> + <cell anchor="east" rows="5"> + <JLabel id="descriptionLabel"/> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="descriptionTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="zipCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="zipCodeTextField"/> + </cell> + <cell anchor="east"> + <JLabel text="lima.identity.city"/> + </cell> + <cell anchor="west"> + <JTextField id="cityTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="emailLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="emailTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="businessNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="businessNumberTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="classificationCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="classificationCodeTextField"/> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="vatNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="vatNumberTextField"/> + </cell> + </row> + + </Table> + </tab> + + <tab id="treasuryTab" title="Trésor Public" layout='{new GridLayout(0,1)}'> + <JPanel layout='{new GridLayout(0,1)}'> + <Table id="treasuryTable" layout='{new GridLayout(3,1)}'> + <row> + <cell anchor="east" rows="5"> + <JLabel id="treasuryAddressLabel" /> + </cell> + <cell anchor="west" + rows="5"> + <JTextArea id="treasuryAddressTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="treasuryZipCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryZipCodeTextField" /> + </cell> + </row> + + <row> + <cell anchor="east"> + <JLabel id="treasuryCityLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryCityTextField"/> + </cell> + </row> + </Table> + + <Table layout='{new GridLayout(1,1)}'> + <row> + <cell anchor="east"> + <JLabel id="treasurySieLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasurySieTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="dossierNumberLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="dossierNumberTextField" /> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryKeyLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryKeyTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryCdiLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryCdiTextField" /> + </cell> + + <cell anchor="east"> + <JLabel id="treasuryServiceCodeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + + <cell anchor="east"> + <JLabel id="treasurySystemTypeLabel"/> + </cell> + <cell anchor="west"> + <JTextField id="treasurySystemTypeTextField" /> + </cell> + </row> + </Table> + </JPanel> + </tab> + </JTabbedPane> <JPanel constraints="BorderLayout.SOUTH" layout='{new GridLayout(1,0)}'> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index f0bcc1f..c0d2e18 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -24,15 +24,19 @@ package org.chorem.lima.ui.identity; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; -import org.chorem.lima.business.LimaServiceFactory; +import org.chorem.lima.entity.Treasury; public class IdentityHandler { protected IdentityService identityService; + protected TreasuryService treasuryService; + protected IdentityForm view; private static final Log log = LogFactory.getLog(IdentityHandler.class); @@ -40,9 +44,8 @@ public class IdentityHandler { public IdentityHandler(IdentityForm view) { this.view = view; - identityService = - LimaServiceFactory.getService( - IdentityService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); } public Identity getIdentity() { @@ -53,21 +56,38 @@ public class IdentityHandler { return identity; } + public Treasury getTreasury() { + Treasury treasury = treasuryService.getTreasury(); + return treasury; + } + public void updateIdentity(){ Identity identity = getIdentity(); identity.setName(view.getNameTextField().getText()); identity.setDescription(view.getDescriptionTextField().getText()); identity.setAddress(view.getAddressTextField().getText()); - identity.setAddress2(view.getAddress2TextField().getText()); identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); + identity.setVatNumber(view.getVatNumberTextField().getText()); identityService.updateIdentity(identity); + + Treasury treasury = treasuryService.getTreasury(); + treasury.setAddress(view.getTreasuryAddressTextField().getText()); + treasury.setCdi(view.getTreasuryCdiTextField().getText()); + treasury.setCity(view.getTreasuryCityTextField().getText()); + treasury.setKey(view.getTreasuryKeyTextField().getText()); + treasury.setServiceCode(view.getTreasuryServiceCodeTextField().getText()); + treasury.setDossierNumber(view.getDossierNumberLabel().getText()); + treasury.setSie(view.getTreasurySieTextField().getText()); + treasury.setZipCode(view.getTreasuryZipCodeTextField().getText()); + treasury.setSystemType(view.getTreasurySystemTypeTextField().getText()); + + treasuryService.updateTreasury(treasury); } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index 7d8da6b..ab1c561 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -75,14 +75,6 @@ text : {handler.getIdentity().getBusinessNumber()}; } -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; -} - #classificationCodeLabel { text : "lima.identity.classificationCode"; } @@ -106,3 +98,90 @@ #emailTextField { text : {handler.getIdentity().getEmail()}; } + +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {handler.getIdentity().getVatNumber()}; +} + +#treasuryAddressLabel { + text : "lima.treasury.address"; +} + +#treasuryAddressTextField { + text : {handler.getTreasury().getAddress()}; +} + +#treasuryAddress2Label { + text : "lima.treasury.address2"; +} + +#treasuryAddress2TextField { + text : {handler.getTreasury().getAddress2()}; +} + +#treasuryCdiLabel { + text : "lima.treasury.cdi"; +} + +#treasuryCdiTextField { + text : {handler.getTreasury().getCdi()}; +} + +#treasuryCityLabel { + text : "lima.treasury.city"; +} +#treasuryCityTextField { + text : {handler.getTreasury().getCity()}; +} + +#treasuryKeyLabel { + text : "lima.treasury.key"; +} + +#treasuryKeyTextField { + text : {handler.getTreasury().getKey()}; +} + +#treasuryServiceCodeLabel { + text : "lima.treasury.serviceCode"; +} + +#treasuryServiceCodeTextField { + text : {handler.getTreasury().getServiceCode()}; +} + +#treasurySieLabel { + text : "lima.treasury.sie"; +} + +#treasurySieTextField { + text : {handler.getTreasury().getSie()}; +} + +#treasuryDossierNumberLabel { + text : "lima.treasury.dossierNumber"; +} + +#treasuryDossierNumberTextField { + text : {handler.getTreasury().getDossierNumber()}; +} + +#treasuryZipCodeLabel { + text : "lima.treasury.zipCode"; +} + +#treasuryZipCodeTextField { + text : {handler.getTreasury().getZipCode()}; +} + +#treasurySystemTypeLabel { + text : "lima.treasury.systemType"; +} + +#treasurySystemTypeTextField { + text : {handler.getTreasury().getSystemType()}; +} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index d99f7f9..50235f8 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -85,14 +85,6 @@ </row> <row> <cell fill="horizontal"> - <JLabel id="vatNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="vatNumberTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> <JLabel id="classificationCodeLabel"/> </cell> <cell fill="horizontal"> @@ -115,5 +107,102 @@ <JTextField id="emailTextField" /> </cell> </row> + <row> + <cell fill="horizontal"> + <JLabel id="vatNumber"/> + </cell> + <cell fill="horizontal"> + <JTextField id="vatNumberTextField" /> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryAddressLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryAddressTextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryAddress2Label"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryAddress2TextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryZipCodeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryZipCodeTextField"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel id="treasuryCityLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryCityTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasurySieLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasurySieTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryVatNumberLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryDossierNumberTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryKeyLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryKeyTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryCdiLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryCdiTextField"/> + </cell> + </row> + + + <row> + <cell fill="horizontal"> + <JLabel id="treasuryServiceCodeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + </row> + + <row> + <cell fill="horizontal"> + <JLabel id="treasurySystemTypeLabel"/> + </cell> + <cell fill="horizontal"> + <JTextField id="treasurySystemTypeTextField"/> + </cell> + </row> + </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 97a5f0d..830d8f9 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -24,8 +24,10 @@ package org.chorem.lima.ui.opening; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; +import org.chorem.lima.entity.Treasury; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -34,14 +36,15 @@ public class CreateIdentityPanelHandler { protected IdentityService identityService; + protected TreasuryService treasuryService; + protected CreateIdentityPanel view; public CreateIdentityPanelHandler(CreateIdentityPanel view) { this.view = view; - identityService = - LimaServiceFactory.getService( - IdentityService.class); + identityService = LimaServiceFactory.getService(IdentityService.class); + treasuryService = LimaServiceFactory.getService(TreasuryService.class); } public Identity getIdentity() { @@ -52,6 +55,11 @@ public class CreateIdentityPanelHandler { return identity; } + public Treasury getTreasury() { + Treasury treasury = treasuryService.getTreasury(); + return treasury; + } + public void updateIdentity(){ Identity identity = getIdentity(); @@ -62,7 +70,7 @@ public class CreateIdentityPanelHandler { identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - identity.setVatNumber(view.getVatNumberTextField().getText()); + //identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 4c6de4d..e0fa104 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -1,3 +1,5 @@ +Identit\\u00e9= +Tr\\u00e9sor\ Public= lima.account=Account lima.account.add=Add account (Ctrl+A) lima.account.add.error.InvalidAccountNumber=Invalid account number\:%1$s @@ -524,6 +526,17 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury.address= +lima.treasury.address2= +lima.treasury.cdi= +lima.treasury.city= +lima.treasury.dossierNumber= +lima.treasury.key= +lima.treasury.serviceCode= +lima.treasury.sie= +lima.treasury.systemType= +lima.treasury.vatNumber= +lima.treasury.zipCode= lima.update=Modify lima.update.shortcut=Update (Ctrl+M) lima.vatStatement=VAT statement chart diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index 6440893..094f9ad 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -1,3 +1,5 @@ +Identit\\u00e9= +Tr\\u00e9sor\ Public= blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.account=Compte lima.account.add=Nouveau compte (Ctrl+A) @@ -420,7 +422,7 @@ lima.identity.description=Description lima.identity.email=Courriel lima.identity.name=Nom lima.identity.phoneNumber=n° Tel -lima.identity.vatNumber=n° TVA +lima.identity.vatNumber=Numéro TVA\: FR lima.identity.zipCode=Code Postal lima.import.error=Une erreur est survenue lors de l'import lima.import.error.extractFile=Le fichier n'est correct @@ -530,6 +532,17 @@ lima.table.provisionDeprecation=Amortissements et provisions lima.table.voucher=Pièce comptable lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury=Trésor Public +lima.treasury.address=Adresse +lima.treasury.address2=Adresse (suite) +lima.treasury.cdi=CDI +lima.treasury.city=Ville +lima.treasury.dossierNumber=Numéro de dossier +lima.treasury.key=Clé +lima.treasury.serviceCode=Code service +lima.treasury.sie=SIE +lima.treasury.systemType=Régime +lima.treasury.zipCode=Code Postal lima.update=Modifier lima.update.shortcut=Modifier (Ctrl+M) lima.vatStatement=Plan TVA diff --git a/lima-swing/src/main/resources/import/vat_default.csv b/lima-swing/src/main/resources/import/vat_default.csv index 4da2dfb..96a0242 100644 --- a/lima-swing/src/main/resources/import/vat_default.csv +++ b/lima-swing/src/main/resources/import/vat_default.csv @@ -1,7 +1,7 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Ventes, prestations de services;N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) @@ -43,7 +43,7 @@ Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35 Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER -Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Biens constituant des immobilisations;N;211, 212, 213, 214;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit f56fee1b2f0b1e6c4f68e4a2f3bde6399ed40c1f Author: dcosse <cosse@codelutin.com> Date: Fri Jul 24 18:29:55 2015 +0200 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité --- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 93 +++++++++++----------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 9d53d7f..031b887 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -42,13 +42,13 @@ <JTabbedPane id="identityContentTabbedPane" constraints="BorderLayout.CENTER"> - <tab id="identityTab" title="Identité" layout='{new GridLayout(0,1)}'> - <Table id="identityTable"> + <tab id="identityTab" title="Identité"> + <Table id="identityTable" fill="both"> <row> - <cell anchor="east"> + <cell anchor="east" weightx="1"> <JLabel id="nameLabel" /> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="nameTextField" /> </cell> </row> @@ -57,27 +57,27 @@ <cell anchor="east"> <JLabel id="phoneNumberLabel"/> </cell> - <cell anchor="west" > + <cell anchor="west" columns="3"> <JTextField id="phoneNumberTextField"/> </cell> </row> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="addressLabel"/> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="addressTextField" /> </cell> </row> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="descriptionLabel"/> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="descriptionTextField"/> </cell> </row> @@ -101,7 +101,7 @@ <cell anchor="east"> <JLabel id="emailLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="emailTextField" /> </cell> </row> @@ -110,7 +110,7 @@ <cell anchor="east"> <JLabel id="businessNumberLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="businessNumberTextField"/> </cell> </row> @@ -119,7 +119,7 @@ <cell anchor="east"> <JLabel id="classificationCodeLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="classificationCodeTextField"/> </cell> </row> @@ -128,7 +128,7 @@ <cell anchor="east"> <JLabel id="vatNumberLabel"/> </cell> - <cell anchor="west"> + <cell anchor="west" columns="3"> <JTextField id="vatNumberTextField"/> </cell> </row> @@ -136,15 +136,15 @@ </Table> </tab> - <tab id="treasuryTab" title="Trésor Public" layout='{new GridLayout(0,1)}'> - <JPanel layout='{new GridLayout(0,1)}'> - <Table id="treasuryTable" layout='{new GridLayout(3,1)}'> + <tab id="treasuryTab" title="Trésor Public"> + <JPanel layout="{new BorderLayout()}"> + <Table fill="both" constraints="BorderLayout.NORTH" insets="5"> <row> - <cell anchor="east" rows="5"> + <cell anchor="northeast"> <JLabel id="treasuryAddressLabel" /> </cell> <cell anchor="west" - rows="5"> + columns="3"> <JTextArea id="treasuryAddressTextField" /> </cell> </row> @@ -156,9 +156,6 @@ <cell anchor="west"> <JTextField id="treasuryZipCodeTextField" /> </cell> - </row> - - <row> <cell anchor="east"> <JLabel id="treasuryCityLabel"/> </cell> @@ -167,48 +164,54 @@ </cell> </row> </Table> - - <Table layout='{new GridLayout(1,1)}'> + <Table fill="both" constraints="BorderLayout.CENTER"> <row> - <cell anchor="east"> + <cell> <JLabel id="treasurySieLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasurySieTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="dossierNumberLabel"/> </cell> - <cell anchor="west"> - <JTextField id="dossierNumberTextField" /> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryKeyLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryKeyTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryCdiLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryCdiTextField" /> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasuryServiceCodeLabel"/> </cell> - <cell anchor="west"> - <JTextField id="treasuryServiceCodeTextField"/> - </cell> - <cell anchor="east"> + <cell> <JLabel id="treasurySystemTypeLabel"/> </cell> - <cell anchor="west"> + </row> + <row> + <cell> + <JTextField id="treasurySieTextField"/> + </cell> + + <cell> + <JTextField id="dossierNumberTextField" /> + </cell> + + <cell> + <JTextField id="treasuryKeyTextField"/> + </cell> + + <cell> + <JTextField id="treasuryCdiTextField" /> + </cell> + + <cell> + <JTextField id="treasuryServiceCodeTextField"/> + </cell> + + <cell> <JTextField id="treasurySystemTypeTextField" /> </cell> </row> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit cfd3f21f337b317721a4c5a783c1d7edfd0a4d82 Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:15:46 2015 +0200 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider --- .../org/chorem/lima/ui/identity/IdentityForm.css | 4 ++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 4 ++-- .../chorem/lima/ui/identity/IdentityHandler.java | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 25 +++++++++++----------- .../resources/i18n/lima-swing_fr_FR.properties | 1 + 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index c46af39..ec1381b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -226,7 +226,7 @@ actionIcon : cancel; } -#ok { - text : "lima.ok"; +#validate { + text : "lima.validate"; actionIcon : ok; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 031b887..936438d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -35,7 +35,7 @@ <script> <![CDATA[ - getRootPane().setDefaultButton(ok); + getRootPane().setDefaultButton(validate); ]]> </script> @@ -224,7 +224,7 @@ layout='{new GridLayout(1,0)}'> <JButton id="cancel" onActionPerformed="dispose();"/> - <JButton id="ok" + <JButton id="validate" onActionPerformed="handler.updateIdentity(); dispose();"/> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index c0d2e18..afda4ba 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -83,7 +83,7 @@ public class IdentityHandler { treasury.setCity(view.getTreasuryCityTextField().getText()); treasury.setKey(view.getTreasuryKeyTextField().getText()); treasury.setServiceCode(view.getTreasuryServiceCodeTextField().getText()); - treasury.setDossierNumber(view.getDossierNumberLabel().getText()); + treasury.setDossierNumber(view.getDossierNumberTextField().getText()); treasury.setSie(view.getTreasurySieTextField().getText()); treasury.setZipCode(view.getTreasuryZipCodeTextField().getText()); treasury.setSystemType(view.getTreasurySystemTypeTextField().getText()); diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index e0fa104..4f79843 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -490,7 +490,7 @@ lima.quit=Exit lima.refresh=Refresh lima.refresh.shortcut=Refresh (F5) lima.remove=Remove -lima.remove.shortcut= +lima.remove.shortcut=Edit (Ctrl+M) lima.report.accounts=Accounts\: lima.report.assets=Assets lima.report.balance=Balance @@ -526,19 +526,20 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction -lima.treasury.address= -lima.treasury.address2= -lima.treasury.cdi= -lima.treasury.city= -lima.treasury.dossierNumber= -lima.treasury.key= -lima.treasury.serviceCode= -lima.treasury.sie= -lima.treasury.systemType= -lima.treasury.vatNumber= -lima.treasury.zipCode= +lima.treasury.address=Address +lima.treasury.address2=Address (next) +lima.treasury.cdi=CDI +lima.treasury.city=City +lima.treasury.dossierNumber=File number +lima.treasury.key=key +lima.treasury.serviceCode=Service Code +lima.treasury.sie=SIE +lima.treasury.systemType=Sytem Type +lima.treasury.vatNumber=VAT number +lima.treasury.zipCode=Zip Code lima.update=Modify lima.update.shortcut=Update (Ctrl+M) +lima.validate=Validate lima.vatStatement=VAT statement chart lima.vatStatement.accounts=List of accounts lima.vatStatement.base=Base VAT statement chart diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index 094f9ad..ef47c97 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -545,6 +545,7 @@ lima.treasury.systemType=Régime lima.treasury.zipCode=Code Postal lima.update=Modifier lima.update.shortcut=Modifier (Ctrl+M) +lima.validate=Valider lima.vatStatement=Plan TVA lima.vatStatement.accounts=Liste des comptes lima.vatStatement.base=Standard -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 797522fb4be6b4621d5e239c17e4a937dab1ebce Author: dcosse <cosse@codelutin.com> Date: Mon Jul 27 11:24:55 2015 +0200 refs #1241 pas de changement dans l'interface de configuration du premier lancement --- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 95 ++----------------- .../lima/ui/opening/CreateIdentityPanel.jaxx | 105 ++------------------- .../ui/opening/CreateIdentityPanelHandler.java | 16 +--- 3 files changed, 20 insertions(+), 196 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index ab1c561..7d8da6b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -75,6 +75,14 @@ text : {handler.getIdentity().getBusinessNumber()}; } +#vatNumberLabel { + text : "lima.identity.vatNumber"; +} + +#vatNumberTextField { + text : {handler.getIdentity().getVatNumber()}; +} + #classificationCodeLabel { text : "lima.identity.classificationCode"; } @@ -98,90 +106,3 @@ #emailTextField { text : {handler.getIdentity().getEmail()}; } - -#vatNumberLabel { - text : "lima.identity.vatNumber"; -} - -#vatNumberTextField { - text : {handler.getIdentity().getVatNumber()}; -} - -#treasuryAddressLabel { - text : "lima.treasury.address"; -} - -#treasuryAddressTextField { - text : {handler.getTreasury().getAddress()}; -} - -#treasuryAddress2Label { - text : "lima.treasury.address2"; -} - -#treasuryAddress2TextField { - text : {handler.getTreasury().getAddress2()}; -} - -#treasuryCdiLabel { - text : "lima.treasury.cdi"; -} - -#treasuryCdiTextField { - text : {handler.getTreasury().getCdi()}; -} - -#treasuryCityLabel { - text : "lima.treasury.city"; -} -#treasuryCityTextField { - text : {handler.getTreasury().getCity()}; -} - -#treasuryKeyLabel { - text : "lima.treasury.key"; -} - -#treasuryKeyTextField { - text : {handler.getTreasury().getKey()}; -} - -#treasuryServiceCodeLabel { - text : "lima.treasury.serviceCode"; -} - -#treasuryServiceCodeTextField { - text : {handler.getTreasury().getServiceCode()}; -} - -#treasurySieLabel { - text : "lima.treasury.sie"; -} - -#treasurySieTextField { - text : {handler.getTreasury().getSie()}; -} - -#treasuryDossierNumberLabel { - text : "lima.treasury.dossierNumber"; -} - -#treasuryDossierNumberTextField { - text : {handler.getTreasury().getDossierNumber()}; -} - -#treasuryZipCodeLabel { - text : "lima.treasury.zipCode"; -} - -#treasuryZipCodeTextField { - text : {handler.getTreasury().getZipCode()}; -} - -#treasurySystemTypeLabel { - text : "lima.treasury.systemType"; -} - -#treasurySystemTypeTextField { - text : {handler.getTreasury().getSystemType()}; -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index 50235f8..d99f7f9 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -85,124 +85,35 @@ </row> <row> <cell fill="horizontal"> - <JLabel id="classificationCodeLabel"/> + <JLabel id="vatNumberLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="classificationCodeTextField"/> + <JTextField id="vatNumberTextField"/> </cell> </row> <row> <cell fill="horizontal"> - <JLabel id="phoneNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="phoneNumberTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="emailLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="emailTextField" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="vatNumber"/> - </cell> - <cell fill="horizontal"> - <JTextField id="vatNumberTextField" /> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryAddressLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryAddressTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryAddress2Label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryAddress2TextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryZipCodeLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryZipCodeTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="treasuryCityLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryCityTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasurySieLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasurySieTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryVatNumberLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryDossierNumberTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryKeyLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="treasuryKeyTextField"/> - </cell> - </row> - - <row> - <cell fill="horizontal"> - <JLabel id="treasuryCdiLabel"/> + <JLabel id="classificationCodeLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasuryCdiTextField"/> + <JTextField id="classificationCodeTextField"/> </cell> </row> - - <row> <cell fill="horizontal"> - <JLabel id="treasuryServiceCodeLabel"/> + <JLabel id="phoneNumberLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasuryServiceCodeTextField"/> + <JTextField id="phoneNumberTextField"/> </cell> </row> - <row> <cell fill="horizontal"> - <JLabel id="treasurySystemTypeLabel"/> + <JLabel id="emailLabel"/> </cell> <cell fill="horizontal"> - <JTextField id="treasurySystemTypeTextField"/> + <JTextField id="emailTextField" /> </cell> </row> - </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 830d8f9..97a5f0d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -24,10 +24,8 @@ package org.chorem.lima.ui.opening; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; -import org.chorem.lima.business.api.TreasuryService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; -import org.chorem.lima.entity.Treasury; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -36,15 +34,14 @@ public class CreateIdentityPanelHandler { protected IdentityService identityService; - protected TreasuryService treasuryService; - protected CreateIdentityPanel view; public CreateIdentityPanelHandler(CreateIdentityPanel view) { this.view = view; - identityService = LimaServiceFactory.getService(IdentityService.class); - treasuryService = LimaServiceFactory.getService(TreasuryService.class); + identityService = + LimaServiceFactory.getService( + IdentityService.class); } public Identity getIdentity() { @@ -55,11 +52,6 @@ public class CreateIdentityPanelHandler { return identity; } - public Treasury getTreasury() { - Treasury treasury = treasuryService.getTreasury(); - return treasury; - } - public void updateIdentity(){ Identity identity = getIdentity(); @@ -70,7 +62,7 @@ public class CreateIdentityPanelHandler { identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); - //identity.setVatNumber(view.getVatNumberTextField().getText()); + identity.setVatNumber(view.getVatNumberTextField().getText()); identity.setClassificationCode(view.getClassificationCodeTextField().getText()); identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 9c2a4711664117acab90fef3eff32bca36d1d76b Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:42:15 2015 +0200 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. --- .../chorem/lima/business/api/AccountService.java | 6 + .../chorem/lima/business/api/EntryBookService.java | 6 + .../chorem/lima/business/api/ImportService.java | 11 ++ .../lima/business/ejb/AccountServiceImpl.java | 7 + .../lima/business/ejb/EntryBookServiceImpl.java | 7 + .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../chorem/lima/ui/importexport/ImportExport.java | 8 + .../opening/{OpeningView.css => BackupPanel.css} | 29 ---- .../org/chorem/lima/ui/opening/BackupPanel.jaxx | 39 +++++ .../{OpeningView.css => BackupPanelHandler.java} | 42 ++--- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 10 +- .../lima/ui/opening/CreateIdentityPanel.jaxx | 64 ++++---- .../ui/opening/CreateIdentityPanelHandler.java | 1 - .../org/chorem/lima/ui/opening/OpeningView.css | 11 +- .../org/chorem/lima/ui/opening/OpeningView.jaxx | 28 +++- .../chorem/lima/ui/opening/OpeningViewHandler.java | 175 +++++++++++++++++---- .../resources/i18n/lima-swing_en_GB.properties | 1 + .../resources/i18n/lima-swing_fr_FR.properties | 1 + 18 files changed, 317 insertions(+), 146 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java index b21482d..5aba6f6 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java @@ -108,4 +108,10 @@ public interface AccountService { List<Account> stringToListAccounts(String selectedAccounts); Account findAccountById(String accountId); + + /** + * Remove all accounts from Lima. + * It's suppose they have no related Entities + */ + void removeAllAccounts(); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java index 4552ade..7e0ccda 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java @@ -103,4 +103,10 @@ public interface EntryBookService { * @return All looked for entry books */ List<EntryBook> findAllEntryBookByEntryBookCodes(List<String> entryBookCodes); + + /** + * Remove all Lima Entry Books + * /!\ becarefull they must not be related to other entities + */ + void removeAllEntryBooks(); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java index d3af17f..08cd68b 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java @@ -55,6 +55,17 @@ public interface ImportService { ImportExportResults importEntriesFromEbp(String datas); + /** + * Remove BCR, Financial Transaction and VAT + */ + void removeAccountabilityLayouts(); + + /** + * Remove all entry books + * /!\ be careful, entry books must not be related to other entities + */ + void removeInitallyImportedEntryBook(); + // String importAsPDF(String data, // ImportExportEntityEnum importExportEntityEnum, // boolean saveMode); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java index b19619f..44022e7 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java @@ -305,4 +305,11 @@ public class AccountServiceImpl extends AbstractLimaService implements AccountSe } return account; } + + @Override + public void removeAllAccounts() { + AccountTopiaDao dao = getDaoHelper().getAccountDao(); + List<Account> accounts = dao.findAll(); + dao.deleteAll(accounts); + } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java index fbdff26..f2df897 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java @@ -202,4 +202,11 @@ public class EntryBookServiceImpl extends AbstractLimaService implements EntryBo } return result; } + + @Override + public void removeAllEntryBooks() { + EntryBookTopiaDao dao = getDaoHelper().getEntryBookDao(); + List<EntryBook> entryBooks = dao.findAll(); + dao.deleteAll(entryBooks); + } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java index a505e8b..9d77b9d 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java @@ -153,15 +153,30 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ }; @Override + public void removeAccountabilityLayouts() { + // vat + vatStatementService.removeAllVatStatement(); + // financialstatement + financialStatementService.removeAllFinancialStatement(); + // accounts + accountService.removeAllAccounts(); + } + + @Override + public void removeInitallyImportedEntryBook() { + entryBookService.removeAllEntryBooks(); + } + + @Override public ImportExportResults importAccountAsCSV(String contents) { ImportExportResults results = new ImportExportResults(); ImportResult result = results.createAddAndGetImportResult(Account.class); - InputStream contentStream = IOUtils.toInputStream(contents); if (StringUtils.isBlank(contents)) { result.addException(new NoDataToImportException()); } else { + InputStream contentStream = IOUtils.toInputStream(contents); try { ImportModel<Account> model = new AccountModel(); Import<Account> accounts = Import.newImport(model, contentStream); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java index 526bfa7..d0d0c47 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java @@ -168,6 +168,14 @@ public class ImportExport { } + public void resetInitialAccountabilityLayoutsImport() { + importService.removeAccountabilityLayouts(); + } + + public void resetInitialImportedEntryBook() { + importService.removeInitallyImportedEntryBook(); + } + public void processImportExport(final ImportExportEnum importExportChoice, boolean verbose) { switch (importExportChoice) { case CSV_ALL_EXPORT: diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css similarity index 70% copy from lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css copy to lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css index 5c8b8d4..73493ec 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.css @@ -19,39 +19,10 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -#openingDialog { - modal : true; - title : "lima.opening"; -} - -#identityIcon { - icon : "identity.png"; -} - -#accountsIcon { - icon : "accounts.png"; -} - -#entrybooksIcon { - icon : "entryBooks.png"; -} - -#fiscalperiodsIcon { - icon : "fiscalYears.png"; -} - #welcomeLabel { text : "lima.opening.welcome"; } #importButton { text : "lima.opening.import"; -} - -#cancel { - text : "lima.opening.close"; -} - -#ok { - text : "lima.opening.next"; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx new file mode 100644 index 0000000..4b978b1 --- /dev/null +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanel.jaxx @@ -0,0 +1,39 @@ +<!-- + #%L + Lima :: Swing + %% + Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<JPanel> + + <BackupPanelHandler id="handler" javaBean="new BackupPanelHandler(this)"/> + + <Table> + <row> + <cell> + <JLabel id="welcomeLabel"/> + </cell> + </row> + <row> + <cell> + <JButton id="importButton" + onActionPerformed="handler.importBackup()"/> + </cell> + </row> + </Table> +</JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java similarity index 61% copy from lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css copy to lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java index 5c8b8d4..6bfc2a7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/BackupPanelHandler.java @@ -1,3 +1,5 @@ +package org.chorem.lima.ui.opening; + /* * #%L * Lima :: Swing @@ -19,39 +21,21 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -#openingDialog { - modal : true; - title : "lima.opening"; -} -#identityIcon { - icon : "identity.png"; -} - -#accountsIcon { - icon : "accounts.png"; -} +import org.chorem.lima.enums.ImportExportEnum; +import org.chorem.lima.ui.importexport.ImportExport; -#entrybooksIcon { - icon : "entryBooks.png"; -} +public class BackupPanelHandler { -#fiscalperiodsIcon { - icon : "fiscalYears.png"; -} + protected BackupPanel view; -#welcomeLabel { - text : "lima.opening.welcome"; -} -#importButton { - text : "lima.opening.import"; -} + public BackupPanelHandler(BackupPanel view) { + this.view = view; + } -#cancel { - text : "lima.opening.close"; + public void importBackup() { + ImportExport importExport = new ImportExport(view); + importExport.importExport(ImportExportEnum.CSV_ALL_IMPORT, null, null, true); + } } - -#ok { - text : "lima.opening.next"; -} \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css index 7d8da6b..91b9aca 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.css @@ -33,6 +33,7 @@ #descriptionTextField { text : {handler.getIdentity().getDescription()}; + rows : 5; } #addressLabel { @@ -41,14 +42,7 @@ #addressTextField { text : {handler.getIdentity().getAddress()}; -} - -#address2Label { - text : "lima.identity.address2"; -} - -#address2TextField { - text : {handler.getIdentity().getAddress2()}; + rows : 5; } #zipCodeLabel { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx index d99f7f9..f34d862 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanel.jaxx @@ -19,7 +19,7 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JPanel> +<JPanel constraints="BorderLayout.CENTER"> <import> org.chorem.lima.ui.opening.CreateIdentityPanelHandler </import> @@ -28,92 +28,84 @@ <Table> <row> - <cell fill="horizontal"> + <cell> <JLabel id="nameLabel" /> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="nameTextField" /> </cell> </row> <row> - <cell fill="horizontal"> - <JLabel id="descriptionLabel"/> - </cell> - <cell fill="horizontal"> - <JTextField id="descriptionTextField"/> - </cell> - </row> - <row> - <cell fill="horizontal"> + <cell> <JLabel id="addressLabel"/> </cell> - <cell fill="horizontal"> - <JTextField id="addressTextField" /> - </cell> - </row> - <row> - <cell fill="horizontal"> - <JLabel id="address2Label"/> - </cell> - <cell fill="horizontal"> - <JTextField id="address2TextField"/> + <cell> + <JTextArea id="addressTextField" /> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="zipCodeLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="zipCodeTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel text="lima.identity.city"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="cityTextField" /> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="businessNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="businessNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="vatNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="vatNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="classificationCodeLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="classificationCodeTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="phoneNumberLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="phoneNumberTextField"/> </cell> </row> <row> - <cell fill="horizontal"> + <cell> <JLabel id="emailLabel"/> </cell> - <cell fill="horizontal"> + <cell> <JTextField id="emailTextField" /> </cell> </row> + <row> + <cell> + <JLabel id="descriptionLabel"/> + </cell> + <cell> + <JTextArea id="descriptionTextField"/> + </cell> + </row> </Table> </JPanel> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 97a5f0d..f043022 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -58,7 +58,6 @@ public class CreateIdentityPanelHandler { identity.setName(view.getNameTextField().getText()); identity.setDescription(view.getDescriptionTextField().getText()); identity.setAddress(view.getAddressTextField().getText()); - identity.setAddress2(view.getAddress2TextField().getText()); identity.setZipCode(view.getZipCodeTextField().getText()); identity.setCity(view.getCityTextField().getText()); identity.setBusinessNumber(view.getBusinessNumberTextField().getText()); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css index 5c8b8d4..8c7ec30 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.css @@ -24,6 +24,11 @@ title : "lima.opening"; } +#backupIcon { + icon : "backup.png"; + border: {BorderFactory.createLineBorder(new Color(0x66, 0xcc, 0x00), 2)} +} + #identityIcon { icon : "identity.png"; } @@ -52,6 +57,10 @@ text : "lima.opening.close"; } -#ok { +#next { text : "lima.opening.next"; +} + +#previous { + text : "lima.opening.previous"; } \ No newline at end of file diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx index 10968ae..d997866 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningView.jaxx @@ -23,7 +23,9 @@ layout="{new BorderLayout()}"> <import> + java.awt.Color javax.swing.BorderFactory + java.awt.FlowLayout javax.swing.ImageIcon jaxx.runtime.SwingUtil </import> @@ -32,13 +34,17 @@ <script> <![CDATA[ - getRootPane().setDefaultButton(ok); + getRootPane().setDefaultButton(next); protected void performNext() { dispose(); } protected void performCancel() { dispose(); } + + void $afterCompleteSetup() { + handler.init(); + } ]]> </script> @@ -48,13 +54,15 @@ <Table> <row> <cell weightx="0.1"> + <JLabel id="backupIcon"/> + </cell> + </row> + <row> + <cell> <JLabel id="identityIcon"/> </cell> <cell weightx="0.9" rows="4" fill="both"> <JPanel id='panel'> - <JLabel id="welcomeLabel"/> - <JButton id="importButton" - onActionPerformed="handler.importBackup()"/> </JPanel> </cell> </row> @@ -77,16 +85,20 @@ </cell> </row> <row weighty="0.1"> - <cell weightx="0.8"> + <cell weightx="0.7"> <JLabel text=''/> </cell> <cell weightx="0.1" fill="none"> <JButton id="cancel" onActionPerformed="performCancel()"/> </cell> - <cell weightx="0.1" fill="none"> - <JButton id="ok" - onActionPerformed="handler.next()"/> + <cell> + <JPanel layout="{new FlowLayout()}"> + <JButton id="previous" + onActionPerformed="handler.previous()"/> + <JButton id="next" + onActionPerformed="handler.next()"/> + </JPanel> </cell> </row> </Table> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java index f2b5b64..0b4a5be 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java @@ -53,29 +53,80 @@ public class OpeningViewHandler { protected OpeningView view; + + protected BackupPanel backupPanel; //Panels - private CreateAccountsPanel caPanel; + protected CreateAccountsPanel caPanel; - private CreateIdentityPanel idPanel; + protected CreateIdentityPanel idPanel; - private CreateEntryBookPanel ebPanel; + protected CreateEntryBookPanel ebPanel; - private CreateFiscalPeriodPanel fsPanel; + protected CreateFiscalPeriodPanel fsPanel; public OpeningViewHandler(OpeningView view) { this.view = view; - caPanel = new CreateAccountsPanel(); + backupPanel = new BackupPanel(); idPanel = new CreateIdentityPanel(); + caPanel = new CreateAccountsPanel(); ebPanel = new CreateEntryBookPanel(); fsPanel = new CreateFiscalPeriodPanel(); - step = 0; } + public void init() { + step = 0; + next(); + } - public void importBackup() { + public void previous() { ImportExport importExport = new ImportExport(view); - importExport.importExport(ImportExportEnum.CSV_ALL_IMPORT, null, null, true); - view.dispose(); + JPanel panel = view.getPanel(); + panel.removeAll(); + step = step - 2; + switch (step) { + case 0: + view.getPrevious().setEnabled(false); + view.getIdentityIcon().setBorder(noBorder); + view.getBackupIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(backupPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 1: + //refresh UI + view.getAccountsIcon().setBorder(noBorder); + view.getIdentityIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(idPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 2: + //refresh UI + // remove all accounts + view.getEntrybooksIcon().setBorder(noBorder); + view.getAccountsIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + caPanel.getButtonGroup().setSelectedValue(null); + panel.add(caPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 3: + view.getNext().setText(t("lima.opening.next")); + // remove all entry books + view.getFiscalperiodsIcon().setBorder(noBorder); + view.getEntrybooksIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(ebPanel); + panel.validate(); + view.repaint(); + step++; + break; + default: + break; + } + } public void next() { @@ -84,14 +135,25 @@ public class OpeningViewHandler { panel.removeAll(); switch (step) { case 0: + view.getPrevious().setEnabled(false); //refresh UI + view.getBackupIcon().setBorder(BorderFactory.createLineBorder(green, 2)); + panel.add(backupPanel); + panel.validate(); + view.repaint(); + step++; + break; + case 1: + view.getPrevious().setEnabled(true); + //refresh UI + view.getBackupIcon().setBorder(noBorder); view.getIdentityIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(idPanel); panel.validate(); view.repaint(); step++; break; - case 1: + case 2: idPanel.getHandler().updateIdentity(); //refresh UI view.getIdentityIcon().setBorder(noBorder); @@ -101,26 +163,10 @@ public class OpeningViewHandler { view.repaint(); step++; break; - case 2: - Object value = caPanel.getButtonGroup().getSelectedValue(); - // if action confirmed - if (value != null) { - if (value instanceof AccountsChartEnum) { - AccountsChartEnum defaultAccountsChartEnum = (AccountsChartEnum) value; - //Import accounts chart - switch (defaultAccountsChartEnum) { - case IMPORT_EBP: - importExport.importExport(ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT, - null, defaultAccountsChartEnum.getDefaultFileURL(), false); - break; - - default: - importExport.importExport(ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT, - null, defaultAccountsChartEnum.getDefaultFileURL(), false); - break; - } - } - } + + case 3: + importAccountabilityLayouts(importExport); + view.getAccountsIcon().setBorder(noBorder); view.getEntrybooksIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(ebPanel); @@ -128,20 +174,23 @@ public class OpeningViewHandler { view.repaint(); step++; break; - case 3: + + case 4: if (ebPanel.getImportEntryBook().isSelected()) { importExport.importExport(ImportExportEnum.CSV_ENTRYBOOKS_IMPORT, null, EntryBooksChartEnum.DEFAULT.getDefaultFileURL(), false); + } else { + importExport.resetInitialImportedEntryBook(); } view.getEntrybooksIcon().setBorder(noBorder); view.getFiscalperiodsIcon().setBorder(BorderFactory.createLineBorder(green, 2)); panel.add(fsPanel); panel.validate(); - view.getOk().setText(t("lima.opening.end")); + view.getNext().setText(t("lima.opening.end")); view.repaint(); step++; break; - case 4: + case 5: try { FiscalPeriod fiscalPeriod = new FiscalPeriodImpl(); fiscalPeriod.setBeginDate(fsPanel.getBeginDatePicker().getDate()); @@ -157,6 +206,66 @@ public class OpeningViewHandler { } } view.dispose(); + break; + } + } + + protected void importAccountabilityLayouts(ImportExport importExport) { + Object value = caPanel.getButtonGroup().getSelectedValue(); + // if action confirmed + if (value != null) { + // reset previous imported values + importExport.resetInitialAccountabilityLayoutsImport(); + + AccountsChartEnum defaultAccountsChartEnum = (AccountsChartEnum) value; + //Import accounts chart + switch (defaultAccountsChartEnum) { + case IMPORT_EBP: + importExport.importExport(ImportExportEnum.EBP_ACCOUNTCHARTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + + default: + importExport.importExport(ImportExportEnum.CSV_ACCOUNTCHARTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + } + //Import financialstatement + switch (defaultAccountsChartEnum) { + case SHORTENED: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, defaultAccountsChartEnum.getDefaultFileURL(), false); + break; + case DEVELOPED: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, FinancialStatementsChartEnum.DEVELOPED.getDefaultFileUrl() , false); + break; + default: + importExport.importExport(ImportExportEnum.CSV_FINANCIALSTATEMENTS_IMPORT, + null, FinancialStatementsChartEnum.BASE.getDefaultFileUrl(), false); + break; + } + //Import vatstatement + switch (defaultAccountsChartEnum) { + case SHORTENED: + + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.SHORTENED.getDefaultFileUrl(), false); + break; + case BASE: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.BASE.getDefaultFileUrl(), false); + break; + case DEVELOPED: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.DEVELOPED.getDefaultFileUrl(), false); + break; + default: + importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, + null, VatStatementsChartEnum.DEFAULT.getDefaultFileUrl(), false); + break; + } + } } } diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 4f79843..5eeb591 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -483,6 +483,7 @@ lima.opening.entryBook=Select it to import default entry books lima.opening.fiscalPeriod=Create fiscal period lima.opening.import=Import a CSV backup lima.opening.next=Next +lima.opening.previous=Previous lima.opening.welcome=<html><center>Welcome to Lima<br/>this assistant help you to start your business accounting in the blink of an eye<br/>OR import instantly your already existing save in CSV format<br/><br/><br/><br/></center></html> lima.paste=Paste lima.preferences=Preferences diff --git a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties index ef47c97..9747eee 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties @@ -490,6 +490,7 @@ lima.opening.entryBook=<html>Cochez la case pour importer les journaux par défa lima.opening.fiscalPeriod=Création de l'exercice lima.opening.import=Importer une sauvegarde CSV lima.opening.next=Suivant +lima.opening.previous=Retour lima.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour démarrer votre comptabilité en quelques instants <br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html> lima.paste=Coller lima.preferences=Préférences -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 6c63783fdab3a94f352d996d8cbf3965385372a3 Author: dcosse <cosse@codelutin.com> Date: Tue Jul 28 14:48:02 2015 +0200 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima --- lima-swing/src/main/resources/icons/backup.png | Bin 0 -> 4803 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/lima-swing/src/main/resources/icons/backup.png b/lima-swing/src/main/resources/icons/backup.png new file mode 100644 index 0000000..a9448cd Binary files /dev/null and b/lima-swing/src/main/resources/icons/backup.png differ -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 7cc39ee6473b0d5c64fca2ecbeb0ccf706b828a0 Author: dcosse <cosse@codelutin.com> Date: Thu Jul 30 17:10:33 2015 +0200 refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports --- .../lima/business/ejb/AbstractLimaService.java | 5 - .../ejb/report/AccountReportServiceImpl.java | 46 ++-- .../ejb/report/BalanceReportServiceImpl.java | 28 +-- .../business/ejb/report/CommonsDocumentReport.java | 57 +++++ .../report/GeneralEntryBookReportServiceImpl.java | 18 +- .../ejb/report/LedgerReportServiceImpl.java | 19 +- .../ProvisionalEntryBookReportServiceImpl.java | 25 ++- .../resources/i18n/lima-business_en_GB.properties | 80 ++++--- .../resources/i18n/lima-business_fr_FR.properties | 78 ++++--- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 60092 -> 61424 bytes .../jasperreports/account/DocumentReport.jrxml | 250 +++++++++++++-------- .../jasperreports/balance/DocumentReport.jrxml | 86 +++++-- .../jasperreports/entryBook/DocumentReport.jrxml | 86 +++++-- .../jasperreports/entryBook/EntryBookReport.jrxml | 3 +- .../entryBook/FinancialPeriodReport.jrxml | 4 +- .../entryBook/TransactionReport.jrxml | 29 +-- .../generalEntryBook/DocumentReport.jrxml | 86 +++++-- .../generalEntryBook/EntryBookPeriodReport.jrxml | 6 +- .../generalLedger/DocumentReport.jrxml | 86 +++++-- .../generalLedger/GeneralLedgerReport.jrxml | 18 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 8 + .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 4 +- .../chorem/lima/ui/identity/IdentityHandler.java | 12 + .../resources/i18n/lima-swing_en_GB.properties | 32 +-- 24 files changed, 727 insertions(+), 339 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java index 2cb10ea..bedb0a5 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/AbstractLimaService.java @@ -27,8 +27,6 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaInterceptor; import org.chorem.lima.entity.LimaCallaoTopiaDaoSupplier; -import java.text.SimpleDateFormat; - /** * Abstract code for all ejb services (get context, catch, finally...). * @@ -37,9 +35,6 @@ import java.text.SimpleDateFormat; */ public abstract class AbstractLimaService { - public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); - public static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm"); - /** Logger. */ protected static final Log log = LogFactory.getLog(AbstractLimaService.class); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 6616e08..1879a4b 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -5,7 +5,6 @@ import org.apache.commons.collections4.CollectionUtils; import org.chorem.lima.beans.AccountEntry; import org.chorem.lima.beans.AccountEntryImpl; import org.chorem.lima.beans.DocumentReport; -import org.chorem.lima.beans.DocumentReportImpl; import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaBusinessConfig; import org.chorem.lima.business.api.IdentityService; @@ -15,7 +14,6 @@ import org.chorem.lima.business.ejb.AbstractLimaService; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.Entry; -import org.chorem.lima.entity.Identity; import javax.ejb.EJB; import javax.ejb.Remote; @@ -45,17 +43,10 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc @Override public DocumentReport getAccountDocumentReport(String accountId, Date from, Date to, JasperReport accountsEntryJasperReport, DecimalFormat bigDecimalFormat) { - String reportName = t("lima.config.documentReport.accountReport.title"); - DocumentReport documentReport = getDocumentReport(reportName, from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); - - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnLetterTitle(t("lima.config.documentReport.columnLetterTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); + String reportName = t("lima-business.document.accountReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, accountsEntryJasperReport, bigDecimalFormat, identityService); + + setHeaderColumnTitles(documentReport); AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); @@ -98,7 +89,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += ", aucune entrée trouvé sur ce compte"; + selectedAccounts += ", aucune entrée trouvée sur ce compte"; } else if (accountEntries.size() == 1){ selectedAccounts += ", et son compte fils"; } else { @@ -116,23 +107,14 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc return documentReport; } - protected static DocumentReport getDocumentReport(String reportName, Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { - Date currentDate = new Date(); - DocumentReport documentReport = new DocumentReportImpl(); - documentReport.setSubReport(subReport); - documentReport.setFormatter(bigDecimalFormat); - - documentReport.setTitleReport(reportName); - - Identity identity = identityService.getIdentity(); - String companyName = identity == null ? "" : identity.getName(); - documentReport.setTitleCompanyName(companyName); - documentReport.setTitleCurrentDate(t("lima.config.documentReport.titleCurrentDate", DATE_FORMAT.format(currentDate), TIME_FORMAT.format(currentDate))); - documentReport.setTitleFromToDate(t("lima.config.documentReport.titleFromToDate", DATE_FORMAT.format(from), DATE_FORMAT.format(to))); - - documentReport.setHeaderSelectedAccountsLabel(t("lima.config.documentReport.headerSelectedAccountsLabel")); - documentReport.setHeaderCurrencyLabel(t("lima.config.documentReport.headerCurrencyLabel")); - documentReport.setHeaderCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); - return documentReport; + protected void setHeaderColumnTitles(DocumentReport documentReport) { + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.columnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnLetterTitle(t("lima-business.document.columnLetterTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index 7992e2f..ff5af26 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -91,17 +91,17 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal @Override public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima.config.documentReport.balanceReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); - - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnBalanceForPeriodTitle(t("lima.config.documentReport.columnBalanceForPeriodTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + String reportName = t("lima-business.document.balanceReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -157,7 +157,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal Account toAccount = accounts.get(accounts.size()-1); String fromAccountText = StringUtils.isNotBlank(fromAccount.getLabel()) ? fromAccount.getLabel() + " (" + fromAccount.getAccountNumber() + ")" : fromAccount.getAccountNumber(); String toAccountText = StringUtils.isNotBlank(toAccount.getLabel()) ? toAccount.getLabel() + " (" + toAccount.getAccountNumber() + ")" : toAccount.getAccountNumber(); - documentReport.setHeaderSelectedAccounts(t("lima.config.documentReport.headerSelectedAccounts", fromAccountText, toAccountText)); + documentReport.setHeaderSelectedAccounts(t("lima-business.document.headerSelectedAccounts", fromAccountText, toAccountText)); } /** @@ -211,8 +211,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); balanceAccount.setAccountNumber(accountNumber); balanceAccount.setLabel(account.getLabel()); - balanceAccount.setSubTotalForLabel(t("lima.config.documentReport.subTotalFor")); - balanceAccount.setTotalForLabel(t("lima.config.documentReport.totalFor")); + balanceAccount.setSubTotalForLabel(t("lima-business.document.subTotalFor")); + balanceAccount.setTotalForLabel(t("lima-business.document.totalFor")); if (balance.compareTo(BigDecimal.ZERO) == 1) { balanceAccount.setDebitBalance(balance.abs()); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java new file mode 100644 index 0000000..3b17a97 --- /dev/null +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java @@ -0,0 +1,57 @@ +package org.chorem.lima.business.ejb.report; + +import net.sf.jasperreports.engine.JasperReport; +import org.apache.commons.lang3.StringUtils; +import org.chorem.lima.beans.DocumentReport; +import org.chorem.lima.beans.DocumentReportImpl; +import org.chorem.lima.business.api.IdentityService; +import org.chorem.lima.entity.Identity; + +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static org.nuiton.i18n.I18n.t; + +/** + * Created by davidcosse on 29/07/15. + */ +public class CommonsDocumentReport { + + public static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); + public static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm"); + + protected static DocumentReport getDocumentReport(String reportName, Date from, Date to, JasperReport subReport, DecimalFormat bigDecimalFormat, IdentityService identityService) { + Date currentDate = new Date(); + DocumentReport documentReport = new DocumentReportImpl(); + documentReport.setSubReport(subReport); + documentReport.setFormatter(bigDecimalFormat); + + documentReport.setTitleReport(reportName); + + Identity identity = identityService.getIdentity(); + String companyName = identity == null ? "" : identity.getName(); + String companyAddress = identity == null ? "" : StringUtils.replace(identity.getAddress(), "\n", ", "); + String companyPostCode = identity == null ? "" : identity.getZipCode(); + String companyCity = identity == null ? "" : identity.getCity(); + String businessNumber = identity == null ? "" : identity.getBusinessNumber(); + String phone = identity == null ? "" : identity.getPhoneNumber(); + + documentReport.setTitleCompanyName(companyName); + documentReport.setTitleCompanyAddress(companyAddress); + documentReport.setTitleCompanyPostCode(companyPostCode); + documentReport.setTitleCompanyCity(companyCity); + documentReport.setTitleCompanySiret(businessNumber); + documentReport.setTitleCompanyPhone(phone); + + documentReport.setTitleCompanySiretLabel(t("lima-business.document.titleCompanySiretLabel")); + documentReport.setTitleCompanyPhoneLabel(t("lima-business.document.titleCompanyPhoneLabel")); + documentReport.setTitleCurrentDate(t("lima-business.document.titleCurrentDate", DATE_FORMAT.format(currentDate), TIME_FORMAT.format(currentDate))); + documentReport.setTitleFromToDate(t("lima-business.document.titleFromToDate", DATE_FORMAT.format(from), DATE_FORMAT.format(to))); + + documentReport.setHeaderSelectedAccountsLabel(t("lima-business.document.headerSelectedAccountsLabel")); + documentReport.setHeaderCurrencyLabel(t("lima-business.document.headerCurrencyLabel")); + documentReport.setHeaderCurrency(bigDecimalFormat.getDecimalFormatSymbols().getCurrencySymbol()); + return documentReport; + } +} diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java index 31ea391..bf4bd1e 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/GeneralEntryBookReportServiceImpl.java @@ -93,15 +93,15 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple @Override public DocumentReport getGeneralEntryBookDocumentReport(Date beginDate, Date endDate, DecimalFormat bigDecimalFormat, JasperReport generalEntryBooksJasperReport, JasperReport entriesJasperReport) { - String reportName = t("lima.config.documentReport.generalEntryBookReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima-business.document.generalEntryBookReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, generalEntryBooksJasperReport, bigDecimalFormat, identityService); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.columnEntryBookTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setLastPageColumnDescription(t("lima.config.documentReport.entrybook.lastPageColumnDescription")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.columnEntryBookTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setLastPageColumnDescription(t("lima-business.document.entrybook.lastPageColumnDescription")); try { if (beginDate != null && endDate != null) { @@ -176,6 +176,8 @@ public class GeneralEntryBookReportServiceImpl extends AbstractLimaService imple if (subAmountCredit.compareTo(BigDecimal.ZERO) != 0 && subAmountDebit.compareTo(BigDecimal.ZERO) != 0) { GeneralEntryBook generalEntryBook = new GeneralEntryBookImpl(); + generalEntryBook.setSubTotalForMonthText(t("lima-business.document.subTotalForMonthText")); + generalEntryBook.setForMonthText(t("lima-business.document.forMonthText")); generalEntryBook.setFormatter(bigDecimalFormat); generalEntryBook.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); generalEntryBook.setPeriod(financialPeriod.getBeginDate()); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java index 3e4c4d7..ffec468 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/LedgerReportServiceImpl.java @@ -71,16 +71,16 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg // grand livre @Override public DocumentReport getLedgerDocumentReport(Date beginDate, Date endDate, DecimalFormat decimalFormat, JasperReport generalLedgersJasperReport, JasperReport entriesJasperReport) { - String reportName = t("lima.config.documentReport.ledgerReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); + String reportName = t("lima-business.document.ledgerReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, generalLedgersJasperReport, decimalFormat, identityService); - documentReport.setColumnDateTitle(t("lima.config.documentReport.setColumnDateTitle")); - documentReport.setColumnEntryBookTitle(t("lima.config.documentReport.setColumnEntryBookTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnBalanceTitle(t("lima.config.documentReport.columnBalanceTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.setColumnDateTitle")); + documentReport.setColumnEntryBookTitle(t("lima-business.document.setColumnEntryBookTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnBalanceTitle(t("lima-business.document.columnBalanceTitle")); if (beginDate != null && endDate != null) { try { @@ -99,6 +99,7 @@ public class LedgerReportServiceImpl extends AbstractLimaService implements Ledg if (account != null) { GeneralLedger generalLedger = new GeneralLedgerImpl(); generalLedger.setFormatter(decimalFormat); + generalLedger.setTotalForAccountText(t("lima-business.document.totalForAccount")); generalLedger.setAccountNumber(account.getAccountNumber()); generalLedger.setLabel(account.getLabel()); BigDecimal amountCredit = reportsDatas.getAmountCredit(); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java index cf5a0a5..206f478 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/ProvisionalEntryBookReportServiceImpl.java @@ -81,18 +81,18 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo @Override public DocumentReport getEntryBookDocumentReport(Date beginDate, Date endDate, List<String> entryBookCodes, DecimalFormat bigDecimalFormat, JasperReport entryBooksJasperReport, JasperReport financialPeriodsJasperReport, JasperReport transactionsJasperReport) { - String reportName = t("lima.config.documentReport.provisionalEntryBookReport.title"); - DocumentReport documentReport = AccountReportServiceImpl.getDocumentReport(reportName, beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); + String reportName = t("lima-business.document.provisionalEntryBookReport.title"); + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, beginDate, endDate, entryBooksJasperReport, bigDecimalFormat, identityService); - documentReport.setColumnAccountTitle(t("lima.config.documentReport.columnAccountTitle")); - documentReport.setColumnCreditTitle(t("lima.config.documentReport.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima.config.documentReport.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima.config.documentReport.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima.config.documentReport.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima.config.documentReport.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima.config.documentReport.columnVoucherTitle")); + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); - documentReport.setLastPageColumnDescription(t("lima.config.documentReport.generalEntrybook.lastPageColumnDescription")); + documentReport.setLastPageColumnDescription(t("lima-business.document.generalEntrybook.lastPageColumnDescription")); try { @@ -120,6 +120,7 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo entryBookReport.setCode(entryBook.getCode()); entryBookReport.setSubReport(financialPeriodsJasperReport); entryBookReport.setFormatter(bigDecimalFormat); + entryBookReport.setEntryBookCodeAndNameText(t("lima-business.document.entryBookCodeAndName")); BigDecimal entryBookSoldeDebit = BigDecimal.ZERO; BigDecimal entryBookSoldeCredit = BigDecimal.ZERO; @@ -128,6 +129,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo for (FinancialPeriod financialPeriod : financialPeriods) { org.chorem.lima.beans.FinancialPeriod financialPeriodReport = new FinancialPeriodImpl(); + financialPeriodReport.setForMonthText(t("lima-business.document.forMonthText")); + financialPeriodReport.setBalanceForEntryBookText(t("lima-business.document.balanceForEntryBook")); financialPeriodReport.setSubReport(transactionsJasperReport); financialPeriodReport.setPeriod(financialPeriod.getBeginDate()); @@ -149,6 +152,8 @@ public class ProvisionalEntryBookReportServiceImpl implements ProvisionalEntryBo Account account = entry.getAccount(); String accountLabel = account != null ? entry.getAccount().getAccountNumber() + " - " + entry.getAccount().getLabel() : ""; Transaction transaction = new TransactionImpl(); + transaction.setSubTotalText(t("lima-business.document.subTotal")); + transaction.setSubTotalForText(t("lima-business.document.subTotalFor")); transaction.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); transaction.setAccount(accountLabel); transaction.setDescription(entry.getDescription()); diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 921217d..f809c87 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -1,17 +1,36 @@ application.version=Version blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-business.document.account=Account +lima-business.document.account.noAccount=Any account present +lima-business.document.account.noAccountTitle=Any account present +lima-business.document.accountReport.title=ACCOUNT lima-business.document.accounts=Accounts lima-business.document.address=Address lima-business.document.addressMore=Address (more) lima-business.document.amount=Amount lima-business.document.amounts=Amounts lima-business.document.amountsperiod=Amounts %1$tB %1$tY +lima-business.document.assets=Assets lima-business.document.balance=Balance +lima-business.document.balanceForEntryBook=Total for entry book %s until %s +lima-business.document.balanceReport.title=BALANCE +lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=Business N° lima-business.document.city=City lima-business.document.classificationcode=Classification Code +lima-business.document.columnAccountTitle=Account +lima-business.document.columnBalanceForPeriodTitle=Balance +lima-business.document.columnBalanceTitle=Balance +lima-business.document.columnCreditTitle=Credit +lima-business.document.columnDateTitle=Date +lima-business.document.columnDebitTitle=Debit +lima-business.document.columnDescriptionTitle=Label +lima-business.document.columnEntryBookTitle=Entry book +lima-business.document.columnLetterTitle=Letter +lima-business.document.columnTotalForPeriodTitle=Total for period +lima-business.document.columnVoucherTitle=Voucher lima-business.document.credit=Credit +lima-business.document.currentAsset=Current asset lima-business.document.date=Date lima-business.document.date.begin=Begin date lima-business.document.date.end=End date @@ -19,13 +38,24 @@ lima-business.document.dateformat=%1$tm/%1$te/%1$tY lima-business.document.debit=Debit lima-business.document.description=Description lima-business.document.entries=Entries +lima-business.document.entryBookCodeAndName=Entry book %s %s lima-business.document.entrybook=Entry book +lima-business.document.entrybook.lastPageColumnDescription=Total for selected entry books lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement +lima-business.document.forMonthText=%s +lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK +lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook lima-business.document.grossamount=Gross Amount +lima-business.document.headerCurrencyLabel=Currency\: +lima-business.document.headerSelectedAccounts=%s to %s +lima-business.document.headerSelectedAccountsLabel=Accounts\: +lima-business.document.investments=Investments lima-business.document.label=Label lima-business.document.ledger=Ledger +lima-business.document.ledgerReport.title=LEDGER +lima-business.document.liabilities=Liabilities lima-business.document.monthformat=%1$tB %1$tY lima-business.document.movementcredit=Credit movement lima-business.document.movementdebit=Debit movement @@ -34,11 +64,23 @@ lima-business.document.period1=Periode from lima-business.document.period1format=%1$tm/%1$te/%1$tY lima-business.document.period2=to lima-business.document.period2format=%1$tm/%1$te/%1$tY +lima-business.document.provisionalEntryBookReport.title=PROVISIONAL ENTRY BOOK lima-business.document.provisiondeprecationamount=Provision Deprecation Amount +lima-business.document.setColumnDateTitle=Date +lima-business.document.setColumnEntryBookTitle=Entry book lima-business.document.society=Society lima-business.document.solde=Solde lima-business.document.soldecredit=Credit solde lima-business.document.soldedebit=Debit solde +lima-business.document.subTotal=Sub total +lima-business.document.subTotalFor=Sub total for %s +lima-business.document.subTotalForMonthText= +lima-business.document.titleCompanyPhoneLabel=Phone\: +lima-business.document.titleCompanySiretLabel=Business N°\: +lima-business.document.titleCurrentDate=Printed on %s at %s +lima-business.document.titleFromToDate=From %s to %s +lima-business.document.totalFor=total for\: +lima-business.document.totalForAccount=Total for account %s lima-business.document.vat=VAT form lima-business.document.vatnumber=VAT N° lima-business.document.voucher=Voucher @@ -58,54 +100,19 @@ lima.config.dateFormat.description= lima.config.dateFormat.label= lima.config.decimalSeparator.label= lima.config.documentReport.account.documentReportModelPath.description= -lima.config.documentReport.account.noAccount=Any account present -lima.config.documentReport.account.noAccountTitle=Any account present -lima.config.documentReport.accountReport.title=ACCOUNT -lima.config.documentReport.assets=Assets -lima.config.documentReport.balance=Balance lima.config.documentReport.balance.balanceAccountReportModelPath.description= lima.config.documentReport.balance.balanceSubAccountReportModelPath.description= lima.config.documentReport.balance.documentReportModelPath.description= -lima.config.documentReport.balanceReport.title=BALANCE -lima.config.documentReport.balanceSheet=Balance -lima.config.documentReport.columnAccountTitle=Account -lima.config.documentReport.columnBalanceForPeriodTitle=Balance -lima.config.documentReport.columnBalanceTitle=Balance -lima.config.documentReport.columnCreditTitle=Credit -lima.config.documentReport.columnDateTitle=Date -lima.config.documentReport.columnDebitTitle=Debit -lima.config.documentReport.columnDescriptionTitle=Label -lima.config.documentReport.columnEntryBookTitle=Entry book -lima.config.documentReport.columnLetterTitle=Letter -lima.config.documentReport.columnTotalForPeriodTitle=Total for period -lima.config.documentReport.columnVoucherTitle=Voucher -lima.config.documentReport.currentAsset=Current asset lima.config.documentReport.entrybook.documentReportModelPath.description= lima.config.documentReport.entrybook.entryBookModelPath.description= lima.config.documentReport.entrybook.financialPeriodModelPath.description= -lima.config.documentReport.entrybook.lastPageColumnDescription= lima.config.documentReport.entrybook.transactionReportModelPath.description= -lima.config.documentReport.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima.config.documentReport.generalEntrybook.documentReportModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description= -lima.config.documentReport.generalEntrybook.lastPageColumnDescription= lima.config.documentReport.generalLedger.documentReportModelPath.description= lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description= lima.config.documentReport.generalLedger.generalLedgerModelPath.description= -lima.config.documentReport.headerCurrencyLabel=Currency\: -lima.config.documentReport.headerSelectedAccounts=%s to %s -lima.config.documentReport.headerSelectedAccountsLabel=Accounts\: -lima.config.documentReport.investments=Investments -lima.config.documentReport.ledgerReport.title=LEDGER -lima.config.documentReport.liabilities=Liabilities -lima.config.documentReport.provisionalEntryBookReport.title=SUMMARY BY ACCOUNT -lima.config.documentReport.setColumnDateTitle=Date -lima.config.documentReport.setColumnEntryBookTitle=Entry book -lima.config.documentReport.subTotalFor=Sub total for\: -lima.config.documentReport.titleCurrentDate=Printed on %s at %s -lima.config.documentReport.titleFromToDate=From %s to %s -lima.config.documentReport.totalFor=total for\: lima.config.host.address.description= lima.config.httpport.description=HTTP Port lima.config.reports.dir.description= @@ -126,6 +133,9 @@ lima.host.http.port.description= lima.importexport.import.alreadyExistFinancialStatement=Same financial statement exists lima.lettering.accountRegularization=Regulatory account lima.report.fromDateToDate= +lima.reports.account.noAccount=Any account present +lima.reports.account.noAccountTitle=Any account present +lima.reports.accounts=Accounts lima.table.credit=Credit lima.table.date=Date lima.table.debit=Debit diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index da69ed6..bfabd31 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -1,17 +1,34 @@ application.version=Version blima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description= lima-business.document.account=Compte +lima-business.document.accountReport.title=COMPTE lima-business.document.accounts=Comptes lima-business.document.address=Adresse lima-business.document.addressMore=Adresse - suite lima-business.document.amount=Total lima-business.document.amounts=Totaux lima-business.document.amountsperiod=Totaux %1$tB %1$tY +lima-business.document.assets=avoirs lima-business.document.balance=Balance +lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s +lima-business.document.balanceReport.title=BALANCE +lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=N° Siret lima-business.document.city=Ville lima-business.document.classificationcode=NAF +lima-business.document.columnAccountTitle=Compte +lima-business.document.columnBalanceForPeriodTitle=Solde période +lima-business.document.columnBalanceTitle=Solde +lima-business.document.columnCreditTitle=Crédit +lima-business.document.columnDateTitle=Date +lima-business.document.columnDebitTitle=Débit +lima-business.document.columnDescriptionTitle=Intitulé +lima-business.document.columnEntryBookTitle=Journal +lima-business.document.columnLetterTitle=Lettre +lima-business.document.columnTotalForPeriodTitle=Total période +lima-business.document.columnVoucherTitle=Pièce comptable lima-business.document.credit=Crédit +lima-business.document.currentAsset=Actif à court terme lima-business.document.date=Date lima-business.document.date.begin=Date de début\: lima-business.document.date.end=Date de fin\: @@ -19,13 +36,24 @@ lima-business.document.dateformat=%1$te/%1$tm/%1$tY lima-business.document.debit=Débit lima-business.document.description=Description lima-business.document.entries=entrées +lima-business.document.entryBookCodeAndName=Journal %s %s lima-business.document.entrybook=Journal +lima-business.document.entrybook.lastPageColumnDescription=Total pour les journaux sélectionnés lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat +lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE +lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général lima-business.document.grossamount=Brut +lima-business.document.headerCurrencyLabel=Devise\: +lima-business.document.headerSelectedAccounts=%s à %s +lima-business.document.headerSelectedAccountsLabel=Comptes\: +lima-business.document.investments=investissements lima-business.document.label=Libellé lima-business.document.ledger=Grand Livre +lima-business.document.ledgerReport.title=GRAND LIVRE +lima-business.document.liabilities=passif lima-business.document.monthformat=%1$tB %1$tY lima-business.document.movementcredit=Mouvement Créditeur lima-business.document.movementdebit=Mouvement Débiteur @@ -34,11 +62,23 @@ lima-business.document.period1=Période du lima-business.document.period1format=%1$te/%1$tm/%1$tY lima-business.document.period2=au lima-business.document.period2format=%1$te/%1$tm/%1$tY +lima-business.document.provisionalEntryBookReport.title=JOURNAL PROVISOIRE lima-business.document.provisiondeprecationamount=Amortissements et provisions +lima-business.document.setColumnDateTitle=Date +lima-business.document.setColumnEntryBookTitle=Journal lima-business.document.society=Nom lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur +lima-business.document.subTotal=Sous total +lima-business.document.subTotalFor=Sous total pour %s +lima-business.document.subTotalForMonthText=Sous-total pour le mois de %s +lima-business.document.titleCompanyPhoneLabel=Téléphone\: +lima-business.document.titleCompanySiretLabel=SIRET\: +lima-business.document.titleCurrentDate=Édition du %s à %s +lima-business.document.titleFromToDate=Du %s au %s +lima-business.document.totalFor=total pour\: +lima-business.document.totalForAccount=Total pour le compte %s lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA lima-business.document.vatPeriod1=%1$tM %1$tY @@ -58,60 +98,28 @@ lima.config.data.dir.description=Répertoire des données de Lima lima.config.dateFormat.description= lima.config.dateFormat.label= lima.config.decimalSeparator.label= +lima.config.document.dir.description=Dossier des rapports lima.config.documentReport.account.accountModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'account' lima.config.documentReport.account.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' -lima.config.documentReport.accountReport.title=COMPTE -lima.config.documentReport.assets=avoirs -lima.config.documentReport.balance=Solde lima.config.documentReport.balance.balanceAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' lima.config.documentReport.balance.balanceSubAccountReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'BalanceAccount' des comptes enfants lima.config.documentReport.balance.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport -lima.config.documentReport.balanceReport.title=BALANCE -lima.config.documentReport.balanceSheet=Balance lima.config.documentReport.bigDecimalFormat=formattage des montants -lima.config.documentReport.columnAccountTitle=Compte -lima.config.documentReport.columnBalanceForPeriodTitle=Solde période -lima.config.documentReport.columnBalanceTitle=Solde -lima.config.documentReport.columnCreditTitle=Crédit -lima.config.documentReport.columnDateTitle=Date -lima.config.documentReport.columnDebitTitle=Débit -lima.config.documentReport.columnDescriptionTitle=Intitulé -lima.config.documentReport.columnEntryBookTitle=Journal -lima.config.documentReport.columnLetterTitle=Lettre -lima.config.documentReport.columnTotalForPeriodTitle=Total période -lima.config.documentReport.columnVoucherTitle=Pièce comptable -lima.config.documentReport.currentAsset=Actif à court terme -lima.config.documentReport.dir.description=Dossier des rapports lima.config.documentReport.entrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' lima.config.documentReport.entrybook.entryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'EntryBook' lima.config.documentReport.entrybook.financialPeriodModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'FinancialPeriod' -lima.config.documentReport.entrybook.lastPageColumnDescription=Total pour les journaux sélectionnés lima.config.documentReport.entrybook.transactionReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'Transaction' lima.config.documentReport.financialStatement.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' lima.config.documentReport.financialStatement.financialStatementModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'financialStatement' -lima.config.documentReport.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE lima.config.documentReport.generalEntrybook.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' lima.config.documentReport.generalEntrybook.generalEntryBookEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBookEntry' lima.config.documentReport.generalEntrybook.generalEntryBookModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'GeneralEntryBook' -lima.config.documentReport.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima.config.documentReport.generalLedger.documentReportModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'DocumentReport' lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedgerEntry' lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' -lima.config.documentReport.headerCurrencyLabel=Devise\: -lima.config.documentReport.headerSelectedAccounts=%s à %s -lima.config.documentReport.headerSelectedAccountsLabel=Comptes\: -lima.config.documentReport.investments=investissements -lima.config.documentReport.ledgerReport.title=GRAND LIVRE -lima.config.documentReport.liabilities=passif -lima.config.documentReport.provisionalEntryBookReport.title=RÉCAPITULATIF PAR COMPTE -lima.config.documentReport.setColumnDateTitle=Date -lima.config.documentReport.setColumnEntryBookTitle=Journal -lima.config.documentReport.subTotalFor=Sous total pour\: -lima.config.documentReport.titleCurrentDate=Édition du %s à %s -lima.config.documentReport.titleFromToDate=Du %s au %s -lima.config.documentReport.totalFor=total pour\: lima.config.host.address.description=Adresse du serveur LIMA lima.config.host.http.port.description=Port HTTP +lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport lima.config.rulesnationality.description=Règles nationales lima.config.scale.description=Précision @@ -127,8 +135,8 @@ lima.host.http.address.description= lima.host.http.port.description=Port du serveur web de Lima lima.importexport.import.alreadyExistFinancialStatement=Transaction financière exitante lima.lettering.accountRegularization=Compte de régulation -lima.report.fromDateToDate= lima.reports.account.noAccount=Aucun compte présent +lima.reports.accounts=Comptes lima.table.credit=Credit lima.table.date=Date lima.table.debit=Débit diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 4bb153c..790db87 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ diff --git a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml index 71d897f..0d55892 100644 --- a/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml @@ -1,44 +1,51 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-06-29T11:12:29 --> +<!-- 2015-07-29T11:17:51 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceReport" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="575" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" isSummaryNewPage="true" isSummaryWithPageHeaderAndFooter="true" isFloa [...] <property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> - <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> - <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> - <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> - <box> - <topPen lineWidth="0.6" lineColor="#804000"/> - <leftPen lineWidth="0.6" lineColor="#804000"/> - <bottomPen lineWidth="0.6" lineColor="#804000"/> - <rightPen lineWidth="0.6" lineColor="#804000"/> - </box> - </style> - <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> - <queryString> + <style name="Default" isDefault="true" scaleImage="Clip" fontName="DejaVu Sans" fontSize="8"/> + <style name="TableHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="HeaderColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <box> + <topPen lineWidth="0.6" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineColor="#804000"/> + </box> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> + <queryString> <![CDATA[]]> </queryString> - <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> - <field name="accounts" class="java.util.List"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> + <field name="accounts" class="java.util.List"/> - <field name="titleCompanyName" class="java.lang.String"/> - <field name="titleCurrentDate" class="java.lang.String"/> - <field name="titleFromToDate" class="java.lang.String"/> - <field name="titleReport" class="java.lang.String"/> + <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> + <field name="titleCurrentDate" class="java.lang.String"/> + <field name="titleFromToDate" class="java.lang.String"/> + <field name="titleReport" class="java.lang.String"/> - <field name="headerCurrency" class="java.lang.String"/> - <field name="headerCurrencyLabel" class="java.lang.String"/> - <field name="headerSelectedAccounts" class="java.lang.String"/> - <field name="headerSelectedAccountsLabel" class="java.lang.String"/> + <field name="headerCurrency" class="java.lang.String"/> + <field name="headerCurrencyLabel" class="java.lang.String"/> + <field name="headerSelectedAccounts" class="java.lang.String"/> + <field name="headerSelectedAccountsLabel" class="java.lang.String"/> - <field name="columnAccountTitle" class="java.lang.String"/> - <field name="columnCreditTitle" class="java.lang.String"/> - <field name="columnDateTitle" class="java.lang.String"/> - <field name="columnDebitTitle" class="java.lang.String"/> - <field name="columnDescriptionTitle" class="java.lang.String"/> - <field name="columnEntryBookTitle" class="java.lang.String"/> - <field name="columnLetterTitle" class="java.lang.String"/> - <field name="columnVoucherTitle" class="java.lang.String"/> + <field name="columnAccountTitle" class="java.lang.String"/> + <field name="columnCreditTitle" class="java.lang.String"/> + <field name="columnDateTitle" class="java.lang.String"/> + <field name="columnDebitTitle" class="java.lang.String"/> + <field name="columnDescriptionTitle" class="java.lang.String"/> + <field name="columnEntryBookTitle" class="java.lang.String"/> + <field name="columnLetterTitle" class="java.lang.String"/> + <field name="columnVoucherTitle" class="java.lang.String"/> <variable name="accounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{accounts})]]></variableExpression> @@ -47,67 +54,120 @@ <background> <band splitType="Stretch"/> </background> - <title> - <band height="41" splitType="Stretch"> - <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> - <box> - <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> - </box> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font size="14" isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleReport}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="444" y="0" width="134" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8" isBold="false"/> - <paragraph rightIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> - </frame> - </band> - </title> - <pageHeader> - <band height="16" splitType="Stretch"> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font size="8" isItalic="true"/> - </textElement> - <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> - </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> - <textElement textAlignment="Right" verticalAlignment="Middle"> - <font size="8"/> - </textElement> - <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></textFieldExpression> - </textField> - </band> - </pageHeader> + <title> + <band height="51" splitType="Stretch"> + <frame> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> + </box> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleReport}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="444" y="0" width="134" height="20" forecolor="#736343" uuid="a60d5d40-69ac-4c50-a33a-67c26cce05f3"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + <paragraph rightIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="8" isBold="false"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> + </textField> + </frame> + </band> + </title> + <pageHeader> + <band height="16" splitType="Stretch"> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="0" y="0" width="444" height="16" uuid="9db3917c-44e3-46d2-b95a-6463e5eff328"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="8" isItalic="true"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerSelectedAccountsLabel} + $F{headerSelectedAccounts}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Oblique" x="444" y="0" width="134" height="16" forecolor="#000000" uuid="abcb18cb-7d0e-4eb8-a9f5-aca4baffa9ae"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{headerCurrencyLabel} + $F{headerCurrency}]]></textFieldExpression> + </textField> + </band> + </pageHeader> <columnHeader> <band height="20"> <frame> @@ -129,7 +189,7 @@ <textFieldExpression><![CDATA[$F{columnDateTitle}]]></textFieldExpression> </textField> <textField> - <reportElement style="HeaderColumn" x="146" y="0" width="36" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> + <reportElement style="HeaderColumn" x="146" y="0" width="36" height="20" uuid="da44668c-4f62-4f75-abaf-cb941b73bfcb"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> @@ -161,14 +221,14 @@ <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{columnDebitTitle}]]></textFieldExpression> </textField> <textField> <reportElement style="HeaderColumn" x="506" y="0" width="72" height="20" uuid="c4f9f592-7052-4b66-abc2-f04cc5f3972c"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="8" isBold="true"/> </textElement> - <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{columnCreditTitle}]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index 16754a9..bc37ab4 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -22,6 +22,13 @@ <field name="mainAccounts" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -45,9 +52,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" splitType="Stretch"> <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -55,7 +62,68 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> </box> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -70,20 +138,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml index d6ade61..c6e48a2 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/DocumentReport.jrxml @@ -38,6 +38,13 @@ <field name="entryBooks" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -68,9 +75,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" splitType="Stretch"> <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -78,7 +85,68 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> </box> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -93,20 +161,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml index 79c7327..aeca794 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/EntryBookReport.jrxml @@ -12,6 +12,7 @@ </queryString> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="entryBookCodeAndNameText" class="java.lang.String"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="financialPeriods" class="java.util.List"/> @@ -40,7 +41,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Journal " + $F{code} + " " + $F{label}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{entryBookCodeAndNameText}, $F{code},$F{label})]]></textFieldExpression> </textField> <textField> <reportElement x="434" y="0" width="72" height="10" uuid="baca77fb-1d57-428f-8746-1bb482b61b55"/> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml index 63e271a..b5134e5 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/FinancialPeriodReport.jrxml @@ -19,6 +19,8 @@ <![CDATA[]]> </queryString> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="balanceForEntryBookText" class="java.lang.String"/> + <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="debitBalance" class="java.math.BigDecimal"/> <field name="creditBalance" class="java.math.BigDecimal"/> @@ -122,7 +124,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Solde pour le journal " + $F{entryBookCode} + " jusqu'à fin " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{balanceForEntryBookText}, $F{entryBookCode}, new SimpleDateFormat("MMMM yyyy").format($F{period}))]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> diff --git a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml index c841467..02e7159 100644 --- a/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/entryBook/TransactionReport.jrxml @@ -16,6 +16,9 @@ <queryString> <![CDATA[]]> </queryString> + <field name="subTotalText" class="java.lang.String"/> + <field name="subTotalForText" class="java.lang.String"/> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="dateFormat" class="java.text.SimpleDateFormat"/> <field name="description" class="java.lang.String"/> @@ -24,19 +27,19 @@ <field name="transactionDate" class="java.util.Date"/> <field name="account" class="java.lang.String"/> <field name="voucher" class="java.lang.String"/> - <variable name="entryBookDebitSolde" class="java.math.BigDecimal" calculation="Sum"> + <variable name="entryBookDebitBalance" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="EntryBookEndColomnDebitSolde" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variable name="entryBookEndColumnDebitBalance" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="EntryBookCreditSolde" class="java.math.BigDecimal" calculation="Sum"> + <variable name="entryBookCreditBalance" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{credit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> - <variable name="EntryBookEndColomnCreditSolde" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> + <variable name="entryBookEndColumnCreditBalance" class="java.math.BigDecimal" resetType="Column" calculation="Sum"> <variableExpression><![CDATA[$F{credit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> </variable> @@ -110,29 +113,29 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Sous-total"]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{subTotalText}]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="false"> <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="75ef2eb9-6e2d-447c-9dd6-488a63fcdf04"> - <printWhenExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> + <printWhenExpression><![CDATA[new Boolean($V{entryBookEndColumnDebitBalance}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> <textElement textAlignment="Right"> - <font fontName="DejaVu Sans Mono" size="8"/> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookEndColumnDebitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookEndColumnDebitBalance}) : ""]]></textFieldExpression> </textField> <textField isBlankWhenNull="false"> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="c52c36a6-6a50-473b-9dad-0526f039b7c1"/> <textElement textAlignment="Right"> - <font fontName="DejaVu Sans Mono" size="8"/> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookEndColomnCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookEndColomnCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookEndColumnCreditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookEndColumnCreditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> @@ -158,7 +161,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA["Sous-total pour " + new SimpleDateFormat("MMMM yyyy").format($F{transactionDate})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{subTotalForText}, new SimpleDateFormat("MMMM yyyy").format($F{transactionDate}))]]></textFieldExpression> </textField> <textField pattern=""> <reportElement x="434" y="0" width="72" height="10" forecolor="#736343" uuid="4c23c4e2-1c93-4a78-b82b-895286708171"/> @@ -170,7 +173,7 @@ <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{entryBookDebitSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookDebitSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookDebitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookDebitBalance}) : ""]]></textFieldExpression> </textField> <textField> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="a7b19080-fcc5-407b-ae5c-20a85afd363e"/> @@ -182,7 +185,7 @@ <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> <paragraph rightIndent="2"/> </textElement> - <textFieldExpression><![CDATA[new Boolean($V{EntryBookCreditSolde}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{EntryBookCreditSolde}) : ""]]></textFieldExpression> + <textFieldExpression><![CDATA[new Boolean($V{entryBookCreditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{entryBookCreditBalance}) : ""]]></textFieldExpression> </textField> </frame> </band> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml index 367cf23..5fe386e 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/DocumentReport.jrxml @@ -34,6 +34,13 @@ <field name="generalEntryBooks" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -61,9 +68,9 @@ <band splitType="Stretch"/> </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" splitType="Stretch"> <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -71,7 +78,68 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> </box> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -86,20 +154,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml index 0ddb70a..054c970 100644 --- a/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalEntryBook/EntryBookPeriodReport.jrxml @@ -20,6 +20,8 @@ </queryString> <field name="formatter" class="java.text.DecimalFormat"/> <field name="dateFormat" class="java.text.SimpleDateFormat"/> + <field name="forMonthText" class="java.lang.String"/> + <field name="subTotalForMonthText" class="java.lang.String"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> @@ -55,7 +57,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Mois de " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{forMonthText},new SimpleDateFormat("MMMM yyyy").format($F{period}))]]></textFieldExpression> </textField> </frame> </band> @@ -87,7 +89,7 @@ <font size="8" isBold="true" isItalic="true"/> <paragraph lineSpacingSize="0.0" leftIndent="40"/> </textElement> - <textFieldExpression><![CDATA["Sous-total " + new SimpleDateFormat("MMMM yyyy").format($F{period})]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{subTotalForMonthText}, new SimpleDateFormat("MMMM yyyy").format($F{period}))]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement style="Default" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="53ba669a-6626-4e70-bbf0-fb243908a20e"/> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml index 7a1a5ac..9073360 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/DocumentReport.jrxml @@ -26,6 +26,13 @@ <field name="generalLedgers" class="java.util.List"/> <field name="titleCompanyName" class="java.lang.String"/> + <field name="titleCompanyAddress" class="java.lang.String"/> + <field name="titleCompanyPostCode" class="java.lang.String"/> + <field name="titleCompanyCity" class="java.lang.String"/> + <field name="titleCompanySiretLabel" class="java.lang.String"/> + <field name="titleCompanySiret" class="java.lang.String"/> + <field name="titleCompanyPhoneLabel" class="java.lang.String"/> + <field name="titleCompanyPhone" class="java.lang.String"/> <field name="titleCurrentDate" class="java.lang.String"/> <field name="titleFromToDate" class="java.lang.String"/> <field name="titleReport" class="java.lang.String"/> @@ -53,9 +60,9 @@ </background> <title> - <band height="41" splitType="Stretch"> + <band height="51" splitType="Stretch"> <frame> - <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="40" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> + <reportElement style="Default" mode="Opaque" x="0" y="1" width="578" height="50" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="1aba49d4-0acc-4925-8731-13c1cc1a90f4"/> <box> <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> @@ -63,7 +70,68 @@ <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#FDCA97"/> </box> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="578" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> + <reportElement style="Default" x="0" y="0" width="195" height="10" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8" isBold="true"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="10" width="195" height="10" forecolor="#736343" uuid="596652a7-7c6e-40c9-85d8-ace32960eb18"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyAddress}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="0" y="20" width="50" height="10" forecolor="#736343" uuid="04a791f3-caf8-47f9-9664-476a72148ef5"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPostCode}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="50" y="20" width="160" height="10" forecolor="#736343" uuid="48f7a5c0-a2d2-48b8-9ac7-5dbb6352b6f6"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyCity}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="30" width="60" height="10" forecolor="#736343" uuid="2cea74ae-6e08-42fa-b7c7-6da7fbe72550"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiretLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="30" width="150" height="10" forecolor="#736343" uuid="73d903f0-c59d-4a2a-826a-c4c36a3ae50a"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanySiret}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="Default" x="0" y="40" width="60" height="10" forecolor="#736343" uuid="3318e3d9-7970-4933-badc-90c41cccad55"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + <paragraph leftIndent="5"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhoneLabel}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="60" y="40" width="150" height="10" forecolor="#736343" uuid="43585fdc-7b80-4e32-b0b7-55c04cce46c4"/> + <textElement verticalAlignment="Middle" rotation="None"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$F{titleCompanyPhone}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="Default" x="195" y="0" width="188" height="20" forecolor="#736343" uuid="9ee9d5f1-6e74-4526-83a4-3b386f2733a8"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font size="14" isBold="true"/> </textElement> @@ -78,20 +146,12 @@ <textFieldExpression><![CDATA[$F{titleCurrentDate}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> - <reportElement style="Default" x="210" y="20" width="160" height="20" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> + <reportElement style="Default" x="210" y="20" width="160" height="15" forecolor="#736343" uuid="37d0a47c-0197-4f09-8358-823b39a2a42a"/> <textElement textAlignment="Center" verticalAlignment="Middle"> - <font isBold="true"/> + <font size="8" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{titleFromToDate}]]></textFieldExpression> </textField> - <textField isBlankWhenNull="true"> - <reportElement style="Default" x="0" y="0" width="190" height="20" forecolor="#736343" uuid="5aa3ceb9-e407-42da-bdc3-097875bdd5f5"/> - <textElement verticalAlignment="Middle" rotation="None"> - <font size="10" isBold="true"/> - <paragraph leftIndent="5"/> - </textElement> - <textFieldExpression><![CDATA[$F{titleCompanyName}]]></textFieldExpression> - </textField> </frame> </band> </title> diff --git a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml index 9987b00..e8fe131 100644 --- a/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/generalLedger/GeneralLedgerReport.jrxml @@ -20,10 +20,10 @@ </queryString> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="formatter" class="java.text.DecimalFormat"/> + <field name="totalForAccountText" class="java.lang.String"/> + <field name="accountNumber" class="java.lang.String"/> <field name="entries" class="java.util.List"/> - - <field name="accountNumber" class="java.lang.String"/> <field name="label" class="java.lang.String"/> <field name="debit" class="java.math.BigDecimal"/> <field name="credit" class="java.math.BigDecimal"/> @@ -100,6 +100,13 @@ <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> </box> + <textField pattern=""> + <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> + <textElement> + <font size="8" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[String.format($F{totalForAccountText}, $F{accountNumber})]]></textFieldExpression> + </textField> <textField isBlankWhenNull="true"> <reportElement x="362" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"/> <textElement textAlignment="Right"> @@ -124,13 +131,6 @@ </textElement> <textFieldExpression><![CDATA[$F{balance}]]></textFieldExpression> </textField> - <textField pattern=""> - <reportElement mode="Transparent" x="0" y="0" width="362" height="10" forecolor="#736343" uuid="3deefb8e-456b-4bbb-8574-1a02651e5d7f"/> - <textElement> - <font size="8" isBold="true"/> - </textElement> - <textFieldExpression><![CDATA["Total pour le compte " + $F{accountNumber}]]></textFieldExpression> - </textField> </frame> </band> </detail> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css index ec1381b..ffb2283 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.css @@ -25,6 +25,14 @@ defaultCloseOperation : {JDialog.DO_NOTHING_ON_CLOSE}; } +#identityTab { + title : {handler.getIdentityTabTitle()}; +} + +#treasuryTab { + title : {handler.getTreasuryTabTitle()}; +} + #nameLabel { text : "lima.identity.name"; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx index 936438d..7b69aef 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityForm.jaxx @@ -42,7 +42,7 @@ <JTabbedPane id="identityContentTabbedPane" constraints="BorderLayout.CENTER"> - <tab id="identityTab" title="Identité"> + <tab id="identityTab"> <Table id="identityTable" fill="both"> <row> <cell anchor="east" weightx="1"> @@ -136,7 +136,7 @@ </Table> </tab> - <tab id="treasuryTab" title="Trésor Public"> + <tab id="treasuryTab"> <JPanel layout="{new BorderLayout()}"> <Table fill="both" constraints="BorderLayout.NORTH" insets="5"> <row> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index afda4ba..3771ca7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -31,6 +31,8 @@ import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; import org.chorem.lima.entity.Treasury; +import static org.nuiton.i18n.I18n.t; + public class IdentityHandler { protected IdentityService identityService; @@ -90,4 +92,14 @@ public class IdentityHandler { treasuryService.updateTreasury(treasury); } + + public String getIdentityTabTitle() { + String result = t("lima.identity"); + return result; + } + + public String getTreasuryTabTitle() { + String result = t("lima.treasury"); + return result; + } } diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 5eeb591..874305f 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -1,5 +1,4 @@ -Identit\\u00e9= -Tr\\u00e9sor\ Public= +lima-business.document.subTotalForMonthText=Sub total for %s lima.account=Account lima.account.add=Add account (Ctrl+A) lima.account.add.error.InvalidAccountNumber=Invalid account number\:%1$s @@ -20,12 +19,12 @@ lima.action.commandline.help=Show help in console lima.balance=Balance lima.cancel=Cancel lima.chart.accounts=Accounts chart -lima.chart.accounts.base=Base accountchart -lima.chart.accounts.developed=Developped accountchart +lima.chart.accounts.base=Base account chart +lima.chart.accounts.developed=Developed account chart lima.chart.accounts.import.csv=CSV customized accounting plan lima.chart.accounts.import.ebp=EBP customized accounting plan -lima.chart.accounts.shortened=Shorthened accountchart -lima.close= +lima.chart.accounts.shortened=Shortened account chart +lima.close=Close lima.closed=Closed lima.code=Code lima.config.category.directories=Directories @@ -196,7 +195,7 @@ lima.entryBook.add=Add entry book (Ctrl+A) lima.entryBook.alreadyExistEntryBook=Already existing entry book lima.entryBook.code=Code lima.entryBook.default=Default entry book -lima.entryBook.delete.used.error=Can't delete entry book %2$s (%1$s) because exist financcial transactions in this entry book. +lima.entryBook.delete.used.error=Can't delete entry book %2$s (%1$s) because exist financial transactions in this entry book. lima.entryBook.error.lockedEntryBook=Closed entry book %2$s (%1$s) for period from %3$te %3$tB %3$tY to %4$te %4$tB %4$tY. lima.entryBook.form=Entry book lima.entryBook.import=Importer @@ -265,7 +264,7 @@ lima.financialStatement.base=Base financial statement chart lima.financialStatement.check=Check accounts passing to movement lima.financialStatement.creditAccounts=Account credit list lima.financialStatement.debitAccounts=Account debit list -lima.financialStatement.developed=Developped financial statement chart +lima.financialStatement.developed=Developed financial statement chart lima.financialStatement.error.alreadyExistFinancialStatement=Failed\! Financial statement %s already exist lima.financialStatement.error.alreadyUsedVatBox=Failed\! VAT box with name '%s' is already used \! lima.financialStatement.header.add=Add category @@ -273,14 +272,14 @@ lima.financialStatement.header.form=Category lima.financialStatement.headerAmount=Calculate amount on header lima.financialStatement.import=Import lima.financialStatement.import.delete=Delete actual financial statement chart before import new -lima.financialStatement.import.description=NO financialstatement chart +lima.financialStatement.import.description=NO financial statement chart lima.financialStatement.label=Label lima.financialStatement.movement.add=Add movement lima.financialStatement.movement.form=Group lima.financialStatement.provisionDeprecationAccounts= lima.financialStatement.remove.confirm=Do you really want to remove this financial statement ? -lima.financialStatement.shortened=Shortened financialstatement chart -lima.financialStatement.subAmount=Calculate a subamount +lima.financialStatement.shortened=Shortened financial statement chart +lima.financialStatement.subAmount=Calculate a sub amount lima.financialStatement.way=Way lima.financialStatements=Financial statements lima.financialStatements.check=check account @@ -476,7 +475,7 @@ lima.open=Open lima.openEjb.remote.mode.description=Server started lima.openEjb.remote.mode.label=Server started lima.opening=Launching -lima.opening.accounts=<html><center>Select a default, <br/>import your personnal<br/> or cancel to create your own account chart.</center></html> +lima.opening.accounts=<html><center>Select a default, <br/>import your personal<br/> or cancel to create your own account chart.</center></html> lima.opening.close=Close lima.opening.end=Finish lima.opening.entryBook=Select it to import default entry books @@ -527,6 +526,7 @@ lima.table.provisionDeprecation=Provision Deprecation lima.table.voucher=Voucher lima.title=Lutin Invoice Monitoring and Accounting lima.transaction=Transaction +lima.treasury=Tax authority administration lima.treasury.address=Address lima.treasury.address2=Address (next) lima.treasury.cdi=CDI @@ -535,7 +535,7 @@ lima.treasury.dossierNumber=File number lima.treasury.key=key lima.treasury.serviceCode=Service Code lima.treasury.sie=SIE -lima.treasury.systemType=Sytem Type +lima.treasury.systemType=System Type lima.treasury.vatNumber=VAT number lima.treasury.zipCode=Zip Code lima.update=Modify @@ -548,9 +548,9 @@ lima.vatStatement.boxName=PDF BoxName lima.vatStatement.default= lima.vatStatement.delete=Delete actual VAT statement chart before import new lima.vatStatement.delete.parent=Remove parent -lima.vatStatement.developed=Developped VAT statement chart +lima.vatStatement.developed=Developed VAT statement chart lima.vatStatement.error.alreadyExistVatStatement= -lima.vatStatement.import=Impport CSV +lima.vatStatement.import=Import CSV lima.vatStatement.import.delete= lima.vatStatement.import.description= lima.vatStatement.label=Label @@ -558,7 +558,7 @@ lima.vatStatement.master=Master VAT statement lima.vatStatement.movement=Movement lima.vatStatement.movement.add=Add movement lima.vatStatement.nothing=No vat statement chart -lima.vatStatement.remove.confirm=Do you realy want to remove line ? +lima.vatStatement.remove.confirm=Do you really want to remove line ? lima.vatStatement.remove.title=Remove line ? lima.vatStatement.shortened=Shortened vat statement chart lima.vatStatements=VAT statements -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit b4373cd69ed0adc9b183349ad0a7577386e3a687 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:13:36 2015 +0200 refs #1241mise à jour du plan de tva --- lima-swing/src/main/resources/import/vat_base.csv | 35 ++++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lima-swing/src/main/resources/import/vat_base.csv b/lima-swing/src/main/resources/import/vat_base.csv index 48bb9ee..0037341 100644 --- a/lima-swing/src/main/resources/import/vat_base.csv +++ b/lima-swing/src/main/resources/import/vat_base.csv @@ -1,14 +1,13 @@ label;header;accounts;boxName;masterVATStatement A. MONTANT DES OPERATIONS REALISEES;O;;; OPERATIONS IMPOSABLES (H.T.);O;;;A. MONTANT DES OPERATIONS REALISEES -Ventes, prestations de services;N;;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Ventes, prestations de services;N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b1;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Autres opérations imposables;N;;b2;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Achats de prestations de services intracommunautaires;N;;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Importations (entreprises ayant opté pour le dispositif d’autoliquidation de la TVA à l’importation);N;;b4;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Acquisitions intracommunautaires;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) -Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b6;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Achats de biens ou de prestations de services réalisées auprès d'un assujetti non établi en France;N;;b7;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) Régularisations (imposables);N;;b8;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Achats de prestations de services intracommunautaires;N;410;b3;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) +Livraisons d’électricité, de gaz naturel, de chaleur ou de froid imposables en France;N;;b5;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS IMPOSABLES (H.T.) OPERATIONS NON IMPOSABLES;O;;;A. MONTANT DES OPERATIONS REALISEES Exportations hors CE;N;;b9;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES Autres opérations non imposables;N;;b10;A. MONTANT DES OPERATIONS REALISEES/OPERATIONS NON IMPOSABLES @@ -20,10 +19,12 @@ Régularisations (non imposables);N;;b15;A. MONTANT DES OPERATIONS REALISEES/OPE B. DECOMPTE DE LA TVA A PAYER;O;;; TVA BRUTE;O;;;B. DECOMPTE DE LA TVA A PAYER Opérations réalisées en France métropolitaine;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE -Taux normal 20% (Base hors taxe);N;;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux normal 20% (Taxe due);N;;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 5,5% (Taxe due);N;;b19;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Base hors taxe);N;;b20;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux réduit 10% (Taxe due);N;;b21;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Taux réduit 5,5% (Base hors taxe);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine -Taux réduit 5,5% (Taxe due);N;;b18;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Base hors taxe);N;701, 702, 703, 704, 705, 706, 707, 708, 7091, 7092, 7094, 7095, 7096, 7097, 7098;b16;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine +Taux normal 20% (Taxe due);N;44571;b17;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées en France métropolitaine Opérations réalisées dans les DOM;O;;;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE Taux normal 8,5% (Base hors taxe);N;;b22;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM Taux normal 8,5% (Taxe due);N;;b23;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations réalisées dans les DOM @@ -40,20 +41,26 @@ Total de le TVA brute due (lignes 08 à 5B);N;;b34;B. DECOMPTE DE LA TVA A PAYER Dont TVA sur importations bénéficiant du dispositif d’autoliquidation;N;;b35;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur acquisitions intracommunautaires;N;;b36;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) Dont TVA sur opérations à destination de Monaco;N;;b37;B. DECOMPTE DE LA TVA A PAYER/TVA BRUTE/Opérations imposables à un autre taux (France métropolitaine ou DOM) -TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER -Biens constituant des immobilisations;N;;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Autres biens et services;N;;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Report du crédit apparaissant ligne 27 de la précédente déclaration;N;;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE CREDIT;O;;;B. DECOMPTE DE LA TVA A PAYER +Autres opérations imposables;N;;;B. DECOMPTE DE LA TVA A PAYER/CREDIT +CREDIT;N;;;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables Crédit de TVA (ligne 23 – ligne 16).;N;;b44;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Remboursement de crédit demandé sur formulaire n°3519 joint;N;;b45;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Crédit de TVA transféré à la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b46;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT Crédit à reporter ( ligne 25 – ligne 26 – ligne AA );N;;b47;B. DECOMPTE DE LA TVA A PAYER/CREDIT/Autres opérations imposables/CREDIT TAXE A PAYER;O;;;B. DECOMPTE DE LA TVA A PAYER +Achats de prestations de services intracommunautaires;N;;;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER +TAXE A PAYER;N;;;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires TVA nette due (ligne 16 – ligne 23);N;;b48;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Taxes assimilées calculées sur annexe n°3310 A;N;;b49;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer acquitté par la société tête de groupe sur la déclaration récapitulative 3310-CA3G;N;;b50;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER/Achats de prestations de services intracommunautaires/TAXE A PAYER Total à payer (lignes 28 + 29 – AB);N;;total2;B. DECOMPTE DE LA TVA A PAYER/TAXE A PAYER +TVA DEDUCTIBLE;O;;;B. DECOMPTE DE LA TVA A PAYER +Autre TVA à déduire;N;;b40;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Sommes à imputer, y compris acompte congés (exprimées en euro);N;;b42;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Indiquer ici le coefficient de taxation forfaitaire;N;;taux;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Total TVA déductible;N;;total1;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Dont TVA non perçue récupérable par les assujettis disposant d'un établissement stable dans les DOM;N;;b43;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Biens constituant des immobilisations;N;44562;b38;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Autres biens et services;N;44566;b39;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE +Report du crédit apparaissant ligne 27 de la précédente déclaration;N;44567;b41;B. DECOMPTE DE LA TVA A PAYER/TVA DEDUCTIBLE -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 21cbf7748f6e2fedbd3a0f22e8e8971258a3fa64 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 2 15:14:52 2015 +0200 refs #1241 minor --- .../src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java index 3771ca7..3263ebb 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java @@ -76,7 +76,6 @@ public class IdentityHandler { identity.setPhoneNumber(view.getPhoneNumberTextField().getText()); identity.setEmail(view.getEmailTextField().getText()); identity.setVatNumber(view.getVatNumberTextField().getText()); - identityService.updateIdentity(identity); Treasury treasury = treasuryService.getTreasury(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit e8e622ed5486d9932ddd4fbc6bf5fd3d72e1c08c Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:14 2015 +0200 refs #1241 internationalisation sur le rapport de compte --- .../lima/business/ejb/report/AccountReportServiceImpl.java | 7 ++++--- .../src/main/resources/i18n/lima-business_en_GB.properties | 12 ++++++++++-- .../src/main/resources/i18n/lima-business_fr_FR.properties | 12 ++++++++++-- .../main/resources/jasperreports/account/AccountEntry.jrxml | 3 ++- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 1879a4b..94c74ff 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -82,6 +82,7 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); accountEntry.setFormatter(bigDecimalFormat); accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); + accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); accountEntries.add(accountEntry); } } @@ -89,11 +90,11 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc documentReport.addAllAccounts(accountEntries); if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += ", aucune entrée trouvée sur ce compte"; + selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); } else if (accountEntries.size() == 1){ - selectedAccounts += ", et son compte fils"; + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); } else { - selectedAccounts += ", et ses comptes fils"; + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); } documentReport.setHeaderSelectedAccounts(selectedAccounts); diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index f809c87..1c64e65 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -12,6 +12,9 @@ lima-business.document.amounts=Amounts lima-business.document.amountsperiod=Amounts %1$tB %1$tY lima-business.document.assets=Assets lima-business.document.balance=Balance +lima-business.document.balance.globalClient=CENTRALISATION CLIENTS +lima-business.document.balance.globalSupplier=CENTRALISATION SUPPLIERS +lima-business.document.balance.lastPageColumnDescription=Global total lima-business.document.balanceForEntryBook=Total for entry book %s until %s lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance @@ -66,6 +69,9 @@ lima-business.document.period2=to lima-business.document.period2format=%1$tm/%1$te/%1$tY lima-business.document.provisionalEntryBookReport.title=PROVISIONAL ENTRY BOOK lima-business.document.provisiondeprecationamount=Provision Deprecation Amount +lima-business.document.selectedAccountAndSubAccount=, and it sub account +lima-business.document.selectedAccountAndSubAccounts=, and it sub accounts +lima-business.document.selectedAccountNoEntryFound=, no entry found lima-business.document.setColumnDateTitle=Date lima-business.document.setColumnEntryBookTitle=Entry book lima-business.document.society=Society @@ -74,12 +80,12 @@ lima-business.document.soldecredit=Credit solde lima-business.document.soldedebit=Debit solde lima-business.document.subTotal=Sub total lima-business.document.subTotalFor=Sub total for %s -lima-business.document.subTotalForMonthText= +lima-business.document.subTotalForMonthText=Sub total for % lima-business.document.titleCompanyPhoneLabel=Phone\: lima-business.document.titleCompanySiretLabel=Business N°\: lima-business.document.titleCurrentDate=Printed on %s at %s lima-business.document.titleFromToDate=From %s to %s -lima-business.document.totalFor=total for\: +lima-business.document.totalFor=Total for %s lima-business.document.totalForAccount=Total for account %s lima-business.document.vat=VAT form lima-business.document.vatnumber=VAT N° @@ -115,6 +121,8 @@ lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description lima.config.documentReport.generalLedger.generalLedgerModelPath.description= lima.config.host.address.description= lima.config.httpport.description=HTTP Port +lima.config.local.description= +lima.config.local.label= lima.config.reports.dir.description= lima.config.reportvatpdfurl.description= lima.config.rulesnationality.description=Rules Nationality diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index bfabd31..49dd9cb 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -10,6 +10,9 @@ lima-business.document.amounts=Totaux lima-business.document.amountsperiod=Totaux %1$tB %1$tY lima-business.document.assets=avoirs lima-business.document.balance=Balance +lima-business.document.balance.globalClient=CENTRALISATION CLIENTS +lima-business.document.balance.globalSupplier=CENTRALISATION FOURNISSEURS +lima-business.document.balance.lastPageColumnDescription=Total général lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance @@ -64,6 +67,9 @@ lima-business.document.period2=au lima-business.document.period2format=%1$te/%1$tm/%1$tY lima-business.document.provisionalEntryBookReport.title=JOURNAL PROVISOIRE lima-business.document.provisiondeprecationamount=Amortissements et provisions +lima-business.document.selectedAccountAndSubAccount=, et son compte fils +lima-business.document.selectedAccountAndSubAccounts=, et ses comptes fils +lima-business.document.selectedAccountNoEntryFound=, aucune entrée trouvée sur ce compte lima-business.document.setColumnDateTitle=Date lima-business.document.setColumnEntryBookTitle=Journal lima-business.document.society=Nom @@ -71,13 +77,13 @@ lima-business.document.solde=Solde lima-business.document.soldecredit=Solde Créditeur lima-business.document.soldedebit=Solde Débiteur lima-business.document.subTotal=Sous total -lima-business.document.subTotalFor=Sous total pour %s +lima-business.document.subTotalFor=Sous-total pour %s lima-business.document.subTotalForMonthText=Sous-total pour le mois de %s lima-business.document.titleCompanyPhoneLabel=Téléphone\: lima-business.document.titleCompanySiretLabel=SIRET\: lima-business.document.titleCurrentDate=Édition du %s à %s lima-business.document.titleFromToDate=Du %s au %s -lima-business.document.totalFor=total pour\: +lima-business.document.totalFor=Total pour %s lima-business.document.totalForAccount=Total pour le compte %s lima-business.document.treasuryPeriod=%1$te%1$tm%1$tY lima-business.document.vat=Déclaration de TVA @@ -119,6 +125,8 @@ lima.config.documentReport.generalLedger.generalLedgerEntryModelPath.description lima.config.documentReport.generalLedger.generalLedgerModelPath.description=fichier source (.jrxml) généré par Jasper Report gérant les beans 'generalLedger' lima.config.host.address.description=Adresse du serveur LIMA lima.config.host.http.port.description=Port HTTP +lima.config.local.description= +lima.config.local.label= lima.config.reports.dir.description=Dossier des rapports lima.config.reportvatpdfurl.description=Chemin du raport lima.config.rulesnationality.description=Règles nationales diff --git a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml index f800454..15b1213 100644 --- a/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml +++ b/lima-report/src/main/resources/jasperreports/account/AccountEntry.jrxml @@ -27,6 +27,7 @@ <field name="lettering" class="java.lang.String"/> <field name="debit" class="java.math.BigDecimal"/> <field name="credit" class="java.math.BigDecimal"/> + <field name="subTotalForLabel" class="java.lang.String"/> <variable name="subTotalDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{debit}]]></variableExpression> @@ -213,7 +214,7 @@ <textElement> <font size="8"/> </textElement> - <textFieldExpression><![CDATA["Sous total"]]></textFieldExpression> + <textFieldExpression><![CDATA[$F{subTotalForLabel}]]></textFieldExpression> </textField> <textField> <reportElement x="506" y="0" width="72" height="10" forecolor="#736343" uuid="0311393c-8196-477b-b00b-e76e767855ee"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 5a144b57c3704298550de84c67656d0da796ab55 Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:25:41 2015 +0200 refs #1241 internationalisation sur le rapport de compte --- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 61424 -> 61665 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/lima-callao/src/main/xmi/lima-callao-model.zargo b/lima-callao/src/main/xmi/lima-callao-model.zargo index 790db87..85b1c37 100644 Binary files a/lima-callao/src/main/xmi/lima-callao-model.zargo and b/lima-callao/src/main/xmi/lima-callao-model.zargo differ -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 887373c77477f6f7919b0c05009b679ca385de4d Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:30 2015 +0200 refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) --- .../chorem/lima/business/api/OptionsService.java | 3 + .../business/api/report/BalanceReportService.java | 3 +- .../chorem/lima/business/LimaBusinessConfig.java | 11 ++- .../lima/business/ejb/OptionsServiceImpl.java | 6 ++ .../ejb/report/BalanceReportServiceImpl.java | 110 ++++++++++++++++++--- .../org/chorem/lima/beans/BalanceAccountImpl.java | 23 +++-- .../lima/report/service/DocumentService.java | 8 +- .../balance/BalanceSubAccountsReport.jrxml | 14 +-- .../jasperreports/balance/DocumentReport.jrxml | 81 +++++++++++++++ .../org/chorem/lima/report/action/ReportTest.java | 2 +- .../org/chorem/lima/server/HttpServerService.java | 40 +++++--- .../main/java/org/chorem/lima/LimaSwingConfig.java | 1 + 12 files changed, 248 insertions(+), 54 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java index 6598454..44ce1e2 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java @@ -24,6 +24,8 @@ package org.chorem.lima.business.api; import org.chorem.lima.business.config.LimaConfigOptionDef; import org.chorem.lima.business.utils.BigDecimalToString; +import java.util.Locale; + /** * Service de report des certaines configurations du swing dans business * <p/> @@ -57,4 +59,5 @@ public interface OptionsService extends BigDecimalToString.Config { int getLimaHttpPort(); + void setLocal(Locale newLocale); } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java index 016e01c..b284fb4 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java @@ -39,10 +39,11 @@ public interface BalanceReportService { * @param from from date * @param to to date * @param selectedAccounts if null all accounts will be selected + * @Param isBalanceGeneral true if general Balance is requested * @param bigDecimalFormat format used for amount representation * @param mainAccountsJasperReport Jasper sub report for balance's main accounts representation * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneral, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java index c7beb4f..c3ecca2 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java +++ b/lima-business/src/main/java/org/chorem/lima/business/LimaBusinessConfig.java @@ -37,6 +37,7 @@ import org.nuiton.topia.flyway.TopiaFlywayService; import org.nuiton.topia.persistence.TopiaConfigurationConstants; import java.io.File; +import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -225,7 +226,14 @@ public class LimaBusinessConfig { loadAccountingRules(); } + public Locale getLocal() { + return config.getOptionAsLocale(BusinessConfigOption.LOCAL.key); + } + public void setLocal(Locale local) { + config.setOption(BusinessConfigOption.LOCAL.key, local.toString()); + saveConfig(); + } public int getScale() { return config.getOptionAsInt(BusinessConfigOption.SCALE.key); @@ -343,9 +351,10 @@ public class LimaBusinessConfig { HOST_EJB_BIND("lima.host.ejb.bind", "", "0.0.0.0", String.class, false, false), HOST_EJB_PORT("lima.host.ejb.port", n("lima.host.ejb.port.description"), "4202", Integer.class, false, false), - HOST_HTTP_ADDRESS("lima.host.http.address", n("lima.host.http.address.description"), "localhost", Integer.class, false, false), + HOST_HTTP_ADDRESS("lima.host.http.address", n("lima.host.http.address.description"), "localhost", String.class, false, false), HOST_HTTP_PORT("lima.host.http.port", n("lima.host.http.port.description"), "5462", Integer.class, false, false), + LOCAL("lima.config.local", t("lima.config.local.label"), n("lima.config.local.description"), Locale.FRANCE.toString() , Locale.class, false, false), SCALE("lima.data.bigDecimal.scale", t("lima.config.scale.label"), n("lima.config.scale.description"), "2", String.class, false, false), CURRENCY("lima.config.currency", t("lima.config.currency.label"), n("lima.config.currency.description"), "false", Boolean.class, false, false), DATE_FORMAT("lima.config.dateFormat", t("lima.config.dateFormat.label"), n("lima.config.dateFormat.description"), "DD/MM/YYYY", Boolean.class, false, false), diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java index 8cbfae8..e4fec31 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java @@ -27,6 +27,7 @@ import org.chorem.lima.business.config.LimaConfigOptionDef; import javax.ejb.Remote; import javax.ejb.Stateless; +import java.util.Locale; @Stateless @Remote(OptionsService.class) @@ -102,4 +103,9 @@ public class OptionsServiceImpl extends AbstractLimaService implements OptionsSe return LimaBusinessConfig.getInstance().getHostHttpPort(); } + @Override + public void setLocal(Locale local) { + LimaBusinessConfig.getInstance().setLocal(local); + } + } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index ff5af26..a9da2e0 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -76,6 +76,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal protected IdentityService identityService; protected static final Integer ACCOUNT_NUMBER_SIZE = 6; + protected static final String GROUP_401 = "401"; + protected static final String GROUP_411 = "411"; protected static final Predicate<BalanceAccount> HAS_NO_ENTRY = new Predicate<BalanceAccount>() { @@ -90,7 +92,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneralSt, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { String reportName = t("lima-business.document.balanceReport.title"); DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); @@ -103,6 +105,15 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); + + boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + + BigDecimal globalDebit = BigDecimal.ZERO; + BigDecimal globalCredit = BigDecimal.ZERO; + BigDecimal globalDebitBalance = BigDecimal.ZERO; + BigDecimal globalCreditBalance = BigDecimal.ZERO; + BalanceTrial balanceTrial = new BalanceTrialImpl(); balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); @@ -128,30 +139,103 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal setDocumentReportHeaderSelectedAccounts(documentReport, accounts); HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); + + BalanceAccount sold401 = null; + BalanceAccount sold411 = null; + for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - BalanceAccountImpl accountSubAccounts = accountsByClasses.get(accountClass); - if (accountSubAccounts == null) { - accountSubAccounts = new BalanceAccountImpl(); - accountSubAccounts.setFormatter(bigDecimalFormat); - accountSubAccounts.setSubReport(subAccountsJasperReport); - accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); - accountsByClasses.put(accountClass, accountSubAccounts); - returnedAccounts.add(accountSubAccounts); - } + // all results for a account classes + BalanceAccountImpl accountSubAccounts = getBalanceAccountForAccountClass(bigDecimalFormat, subAccountsJasperReport, returnedAccounts, accountsByClasses, accountClass); + + // compute balance for the account classes BalanceAccount subClassAccount = computeSubAccountBalance(accountClass, account, from, to, bigDecimalFormat); + + // only add it if there are results if (subClassAccount != null) { - accountSubAccounts.addSubAccount(subClassAccount); + // we group Account 401 and 411 with there sub accounts + String accountNb = account.getAccountNumber(); + + if (isBalanceGeneral && ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411)))){ + BalanceAccount balanceAccount = null; + if ((accountNb.startsWith(GROUP_401))){ + if (sold401 == null) { + sold401 = new BalanceAccountImpl(); + sold401.setLabel(t("lima-business.document.balance.globalSupplier")); + sold401.setFormatter(bigDecimalFormat); + sold401.setAccountNumber("4010000"); + accountSubAccounts.addSubAccount(sold401); + } + balanceAccount = sold401; + } else if((accountNb.startsWith(GROUP_411))) { + if (sold411 == null) { + sold411 = new BalanceAccountImpl(); + sold411.setLabel(t("lima-business.document.balance.globalClient")); + sold411.setFormatter(bigDecimalFormat); + sold411.setAccountNumber("4110000"); + accountSubAccounts.addSubAccount(sold411); + } + balanceAccount = sold411; + } + + if (balanceAccount != null) { + // add amounts to global 4 account + addInWith(accountSubAccounts, subClassAccount); + + // add amounts to 401 or 411 global amount + addInWith(balanceAccount, subClassAccount); + + // add amounts to global result + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } + + } else { + accountSubAccounts.addSubAccount(subClassAccount); + + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } } } } Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); documentReport.addAllMainAccounts(returnedAccounts); + + documentReport.setTotalDebit(globalDebit); + documentReport.setTotalCredit(globalCredit); + documentReport.setDebitBalance(globalDebitBalance); + documentReport.setCreditBalance(globalCreditBalance); + return documentReport; } + protected void addInWith(BalanceAccount target, BalanceAccount toBeAdded) { + target.setAmountDebit(target.getAmountDebit().add(toBeAdded.getAmountDebit())); + target.setAmountCredit(target.getAmountCredit().add(toBeAdded.getAmountCredit())); + target.setDebitBalance(target.getDebitBalance().add(toBeAdded.getDebitBalance())); + target.setCreditBalance(target.getCreditBalance().add(toBeAdded.getCreditBalance())); + } + + protected BalanceAccountImpl getBalanceAccountForAccountClass(DecimalFormat bigDecimalFormat, JasperReport subAccountsJasperReport, Collection<BalanceAccount> returnedAccounts, HashMap<String, BalanceAccountImpl> accountsByClasses, String accountClass) { + BalanceAccountImpl accountSubAccounts = accountsByClasses.get(accountClass); + if (accountSubAccounts == null) { + accountSubAccounts = new BalanceAccountImpl(); + accountSubAccounts.setFormatter(bigDecimalFormat); + accountSubAccounts.setSubReport(subAccountsJasperReport); + accountSubAccounts.setSubAccounts(new ArrayList<BalanceAccount>()); + accountsByClasses.put(accountClass, accountSubAccounts); + returnedAccounts.add(accountSubAccounts); + } + return accountSubAccounts; + } + protected void setDocumentReportHeaderSelectedAccounts(DocumentReport documentReport, List<Account> accounts) { Account fromAccount = accounts.get(0); Account toAccount = accounts.get(accounts.size()-1); @@ -196,7 +280,6 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceAccount balanceAccount = addSubAccountReport(mainAccountLabel, account, bigDecimalFormat, credit, debit, balance); - return balanceAccount; } @@ -216,10 +299,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal if (balance.compareTo(BigDecimal.ZERO) == 1) { balanceAccount.setDebitBalance(balance.abs()); - balanceAccount.setCreditBalance(BigDecimal.ZERO); } else { balanceAccount.setCreditBalance(balance.abs()); - balanceAccount.setDebitBalance(BigDecimal.ZERO); } balanceAccount.setAmountCredit(credit); @@ -227,4 +308,5 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal } return balanceAccount; } + } diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java index de819dc..2e1bdde 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/BalanceAccountImpl.java @@ -29,24 +29,23 @@ public class BalanceAccountImpl extends BalanceAccount { private static final long serialVersionUID = 1L; + public BalanceAccountImpl() { + this.amountDebit = BigDecimal.ZERO; + this.amountCredit = BigDecimal.ZERO; + this.debitBalance = BigDecimal.ZERO; + this.creditBalance = BigDecimal.ZERO; + } + public void addSubAccount(BalanceAccount subAccount) { // we only add account that have values if (subAccount.getAmountDebit() != null && subAccount.getAmountCredit() != null) { getSubAccounts().add(subAccount); - BigDecimal newAmountDebit = this.amountDebit == null ? BigDecimal.ZERO : this.amountDebit; - BigDecimal newAmountCredit = this.amountCredit == null ? BigDecimal.ZERO : this.amountCredit; - BigDecimal newSoldeDebit = this.debitBalance == null ? BigDecimal.ZERO : this.debitBalance; - BigDecimal newSoldeCredit = this.creditBalance == null ? BigDecimal.ZERO : this.creditBalance; - - this.amountDebit = subAccount.getAmountDebit().add(newAmountDebit); - - this.amountCredit = subAccount.getAmountCredit().add(newAmountCredit); - - this.debitBalance = subAccount.getDebitBalance().add(newSoldeDebit); - - this.creditBalance = subAccount.getCreditBalance().add(newSoldeCredit); + this.amountDebit = this.amountDebit.add(subAccount.getAmountDebit()); + this.amountCredit = this.amountCredit.add(subAccount.getAmountCredit()); + this.debitBalance = this.debitBalance.add(subAccount.getDebitBalance()); + this.creditBalance = this.creditBalance.add(subAccount.getCreditBalance()); } // firePropertyChange(PROPERTY_SUB_ACCOUNTS, null, subAccount); diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 40ef663..37206ec 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -472,10 +472,10 @@ public class DocumentService { //############## balance ############## - public void createBalanceDocuments(Date beginDate, Date endDate, String fromToAccount) { + public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneral, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); JasperReport balanceSubAccountsReport = jasperReports.getBalanceSubAccountsReport(); - DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, + DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, isBalanceGeneral, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); jasperReports.generatePDFReport(DocumentsEnum.BALANCE, balanceFilePath, Lists.newArrayList(report)); } @@ -520,13 +520,13 @@ public class DocumentService { return inputStream; } - public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account, String autocomplete) throws IOException { + public GeneratedReport createReport(Date beginDate, Date endDate, String model, String account, String isBalanceGeneral, String autocomplete) throws IOException { String stringResult = null; //create docs switch (DocumentsEnum.valueOfLink(model)) { case BALANCE: - createBalanceDocuments(beginDate, endDate, null); + createBalanceDocuments(beginDate, endDate, isBalanceGeneral, null); break; case ACCOUNT: createAccountDocument(account, beginDate, endDate); diff --git a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml index 4f8896d..3b7611c 100644 --- a/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/BalanceSubAccountsReport.jrxml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 --> -<!-- 2015-07-02T18:03:10 --> +<!-- 2015-09-07T13:45:22 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="BalanceClassesReport" pageWidth="578" pageHeight="20" columnWidth="578" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="75ff86c6-c370-4f0b-a2d3-e17324a465bb"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/> @@ -11,7 +11,6 @@ <![CDATA[]]> </queryString> <field name="formatter" class="java.text.DecimalFormat"/> - <field name="accountNumber" class="java.lang.String"/> <field name="label" class="java.lang.String"/> <field name="amountDebit" class="java.math.BigDecimal"/> @@ -21,7 +20,6 @@ <field name="mainAccountLabel" class="java.lang.String"/> <field name="totalForLabel" class="java.lang.String"/> <field name="subTotalForLabel" class="java.lang.String"/> - <variable name="amountBalanceDebit" class="java.math.BigDecimal" calculation="Sum"> <variableExpression><![CDATA[$F{amountDebit}]]></variableExpression> <initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression> @@ -162,7 +160,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA[$F{subTotalForLabel} + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{subTotalForLabel}, $F{mainAccountLabel})]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="9c59df76-21ef-428f-8266-0da4cade0a20"> @@ -172,7 +170,6 @@ <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> - <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -208,7 +205,7 @@ <textFieldExpression><![CDATA[new Boolean($V{sumBalanceCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($V{sumBalanceCredit}) : ""]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> - <reportElement key="" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="7f9a6117-e3b4-492f-ba5a-b4f913516294"> + <reportElement key="" isPrintRepeatedValues="false" x="290" y="0" width="72" height="10" forecolor="#736343" uuid="7f9a6117-e3b4-492f-ba5a-b4f913516294"> <property name="local_mesure_unitx" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="px"/> <property name="local_mesure_unitwidth" value="pixel"/> @@ -217,7 +214,6 @@ <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> - <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -289,7 +285,7 @@ <font size="8" isBold="true"/> <paragraph leftIndent="80"/> </textElement> - <textFieldExpression><![CDATA[$F{totalForLabel} + $F{mainAccountLabel}]]></textFieldExpression> + <textFieldExpression><![CDATA[String.format($F{totalForLabel}, $F{mainAccountLabel})]]></textFieldExpression> </textField> <textField pattern="" isBlankWhenNull="true"> <reportElement key="" x="434" y="0" width="72" height="10" forecolor="#736343" uuid="6edd1323-c09c-45f8-ac94-be4753616581"> @@ -299,7 +295,6 @@ <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitheight" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="px"/> - <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> @@ -344,7 +339,6 @@ <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="local_mesure_unity" value="pixel"/> <property name="com.jaspersoft.studio.unit.y" value="px"/> - <printWhenExpression><![CDATA[new Boolean($V{sumBalanceDebit}.compareTo(BigDecimal.ZERO) != 0)]]></printWhenExpression> </reportElement> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> diff --git a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml index bc37ab4..9cb88c4 100644 --- a/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml +++ b/lima-report/src/main/resources/jasperreports/balance/DocumentReport.jrxml @@ -14,10 +14,22 @@ <rightPen lineWidth="0.6" lineColor="#804000"/> </box> </style> + + <style name="FooterHeader" mode="Opaque" forecolor="#D0B48E" backcolor="#FDCA97" fontName="DejaVu Sans"/> + <style name="FooterColumn" forecolor="#804000" fontName="DejaVu Sans" fontSize="8" isBold="true"> + <box> + <topPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <leftPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <bottomPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + <rightPen lineWidth="0.6" lineStyle="Solid" lineColor="#804000"/> + </box> + </style> + <style name="Oblique" fontName="DejaVu Sans Mono" fontSize="8" isItalic="true"/> <queryString> <![CDATA[]]> </queryString> + <field name="formatter" class="java.text.DecimalFormat"/> <field name="subReport" class="net.sf.jasperreports.engine.JasperReport"/> <field name="mainAccounts" class="java.util.List"/> @@ -44,6 +56,14 @@ <field name="columnDebitTitle" class="java.lang.String"/> <field name="columnDescriptionTitle" class="java.lang.String"/> <field name="columnTotalForPeriodTitle" class="java.lang.String"/> + + <field name="lastPageColumnDescription" class="java.lang.String"/> + + <field name="totalDebit" class="java.math.BigDecimal"/> + <field name="totalCredit" class="java.math.BigDecimal"/> + <field name="debitBalance" class="java.math.BigDecimal"/> + <field name="creditBalance" class="java.math.BigDecimal"/> + <variable name="mainAccounts" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"> <variableExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((java.util.List)$F{mainAccounts})]]></variableExpression> </variable> @@ -260,4 +280,65 @@ </textField> </band> </pageFooter> + <lastPageFooter> + <band height="30"> + <frame> + <reportElement style="FooterHeader" stretchType="RelativeToBandHeight" x="0" y="0" width="578" height="20" isRemoveLineWhenBlank="true"/> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="0" y="0" width="434" height="20"/> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font size="12" isBold="true" isItalic="true"/> + <paragraph lineSpacingSize="0.0" leftIndent="40"/> + </textElement> + <textFieldExpression><![CDATA[$F{lastPageColumnDescription}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="290" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{totalDebit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{totalDebit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="362" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{totalCredit}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{totalCredit}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="434" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{debitBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{debitBalance}) : ""]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement style="FooterColumn" x="506" y="0" width="72" height="20"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font fontName="DejaVu Sans Mono" size="8" isBold="true"/> + <paragraph lineSpacingSize="0.0" rightIndent="2"/> + </textElement> + <textFieldExpression><![CDATA[new Boolean($F{creditBalance}.compareTo(BigDecimal.ZERO) != 0) ? $F{formatter}.format($F{creditBalance}) : ""]]></textFieldExpression> + </textField> + </frame> + <textField isBlankWhenNull="false"> + <reportElement x="0" y="20" width="288" height="10"/> + <textElement textAlignment="Right"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report"> + <reportElement x="288" y="20" width="287" height="10"/> + <textElement textAlignment="Left"> + <paragraph lineSpacingSize="0.0"/> + </textElement> + <textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + </band> + </lastPageFooter> </jasperReport> diff --git a/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java b/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java index 5826982..a8d1f56 100644 --- a/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java +++ b/lima-report/src/test/java/org/chorem/lima/report/action/ReportTest.java @@ -55,6 +55,6 @@ public class ReportTest { Date beginDateFormat = df.parse("01/01/2013"); Date endDateFormat = df.parse("31/12/2014"); DocumentService documentService = new DocumentService(); - documentService.createBalanceDocuments(beginDateFormat, endDateFormat, null); + documentService.createBalanceDocuments(beginDateFormat, endDateFormat, null, null); } } diff --git a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java index 127a6b5..eaa9a13 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java +++ b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaTechnicalException; +import org.chorem.lima.business.LimaBusinessConfig; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.entity.Account; @@ -58,6 +59,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Locale; import static org.nuiton.i18n.I18n.t; @@ -140,13 +142,13 @@ public class HttpServerService { String endDate = req.getParameter("endDate"); String account = (StringUtils.isBlank(req.getParameter("account")) ? null : URLDecoder.decode(req.getParameter("account"), "UTF-8")); String autocomplete = req.getParameter("autocomplete") == null ? "true" : req.getParameter("autocomplete"); - + String isGeneral = req.getParameter("isGeneral") == null ? "true" : req.getParameter("isGeneral"); if (imageParam != null) { // render image doImage(resp, imageParam); } else if (model != null && beginDate != null && endDate != null) { // generate and render report - doCreateReport(resp, model, beginDate, endDate, account, autocomplete); + doCreateReport(resp, model, beginDate, endDate, account, isGeneral, autocomplete); } else { // render home HTML doHomeHtml(req, resp); @@ -168,7 +170,7 @@ public class HttpServerService { } protected void doCreateReport(HttpServletResponse resp, String model, String beginDate, String endDate, - String account, String autocomplete) throws IOException { + String account, String isGeneral, String autocomplete) throws IOException { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); @@ -178,7 +180,7 @@ public class HttpServerService { Date endDateFormat = sdf.parse(endDate); GeneratedReport generatedReport = - documentService.createReport(beginDateFormat, endDateFormat, model, account, autocomplete); + documentService.createReport(beginDateFormat, endDateFormat, model, account, isGeneral, autocomplete); if (Strings.isNullOrEmpty(generatedReport.getHtmlContent())) { InputStream in = generatedReport.getPdfStream(); @@ -225,7 +227,11 @@ public class HttpServerService { beginDatePicker = DateUtils.truncate(beginDatePicker, Calendar.YEAR); - pageContent.append("<!DOCTYPE html>\n" + "<html lang=\"fr\">\n" + Locale locale = LimaBusinessConfig.getInstance().getLocal(); + + pageContent.append("<!DOCTYPE html>\n" + "<html lang=\""); + pageContent.append(locale.getLanguage()); + pageContent.append("\">\n" + "<head>\n" + "<script type=\"text/javascript\">" + " function showAccountInput(){" + @@ -239,8 +245,18 @@ public class HttpServerService { " document.getElementById('accountField').style.display = 'none';" + " }" + " }" + + " var request = document.getElementById('model');" + + " var requestValue = request == null ? '': request.value;" + + " var isDocumentBalance = requestValue === 'lima_balance'; " + + " if (document.getElementById('balanceType') != null) {" + + " if (isDocumentBalance) {" + + " document.getElementById('balanceType').style.display = 'block';" + + " } else {" + + " document.getElementById('balanceType').style.display = 'none';" + + " }" + + " }" + " }" + - " showAccountInput();" + + " showAccountInput();" + " </script>" + "<title>LIMA Documents Report</title>\n" + "<style type=\"text/css\">" + "body { font: 14px sans-serif; }" + "h1 { font: 20px sans-serif; text-align: center; }" + "table.padding td {padding-right:20px;}" + ".tdright {text-align: right;}" + "</style>" + "</head>\n" @@ -255,11 +271,8 @@ public class HttpServerService { .append("<input value=\"") .append(sdf.format(endDatePicker)) .append("\" type=\"date\" name=\"endDate\">\n<br/><br/>"); - //+ "Format : <select name=\"format\">"); - - pageContent.append(/*"</select>\n" - + */"Documents : <select id=\"model\" name=\"model\" onchange='showAccountInput()'>"); + pageContent.append("Documents : <select id=\"model\" name=\"model\" onchange='showAccountInput()'>"); for (DocumentsEnum documentsEnum : DocumentsEnum.values()) { pageContent.append("<option value=\"") @@ -278,10 +291,15 @@ public class HttpServerService { optionAccounts.append("</option>\n"); } - pageContent.append("</select>" + pageContent.append( "</select>" + "<div id='accountField'>Compte : <select id=\"account\" name=\"account\">" + optionAccounts.toString() + "</select></div>" + + "<div id='balanceType'>" + + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>Balance Générale\n" + + " <br>\n" + + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">Balance Globale" + + "</div>" + "<input type=\"submit\">\n" + "</form></td>" + "<tr><td class=\"tdright\"><img src=\"?img=entries.png\"/></td></tr>\n" diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java index 740f3ae..f1af0d0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java @@ -172,6 +172,7 @@ public class LimaSwingConfig extends ApplicationConfig implements BigDecimalToSt */ public void setLocale(Locale newLocale) { setOption(Option.LOCALE.key, newLocale.toString()); + optionsService.setLocal(newLocale); saveForUser(); firePropertyChange("locale", null, newLocale); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit b8a6ceb2670186b6b079c3b7ed4b8140dedec6ba Author: dcosse <cosse@codelutin.com> Date: Mon Sep 7 14:27:50 2015 +0200 refs #1241 monté de version je Jasper report --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 618b24a..2ff29d5 100644 --- a/pom.xml +++ b/pom.xml @@ -198,7 +198,7 @@ <h2Version>1.3.176</h2Version> <hibernateVersion>4.3.7.Final</hibernateVersion> <itextVersion>4.2.1</itextVersion> - <jasperreportsVersion>6.0.3</jasperreportsVersion> + <jasperreportsVersion>6.1.1</jasperreportsVersion> <javaxServletVersion>3.1.0</javaxServletVersion> <jaxxVersion>2.26</jaxxVersion> <jbossTransactionVersion>1.0.0.Final</jbossTransactionVersion> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 6f487bfcfab4a1c2775746c314e14b9387992465 Author: dcosse <cosse@codelutin.com> Date: Wed Sep 9 15:21:41 2015 +0200 refs #1241 refactoring de code --- .../business/api/report/BalanceReportService.java | 15 +- .../ejb/report/BalanceReportServiceImpl.java | 190 +++++++++++++++------ .../lima/report/service/DocumentService.java | 21 ++- 3 files changed, 171 insertions(+), 55 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java index b284fb4..1a23f70 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java @@ -45,5 +45,18 @@ public interface BalanceReportService { * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneral, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + + /** + * + * @param from + * @param to + * @param selectedAccounts + * @param bigDecimalFormat + * @param mainAccountsJasperReport + * @param subAccountsJasperReport + * @return + */ + DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index a9da2e0..dbf7208 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -66,6 +66,8 @@ import static org.nuiton.i18n.I18n.t; @TransactionAttribute public class BalanceReportServiceImpl extends AbstractLimaService implements BalanceReportService { + public static final String GLOBAL_401_ACCOUNT_NUMBER = "4010000"; + public static final String GLOBAL_411_ACCOUNT_NUMBER = "4110000"; @EJB protected FinancialPeriodService financialPeriodService; @@ -92,46 +94,64 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getBalanceDocumentReport(Date from, Date to, String selectedAccounts, String isBalanceGeneralSt, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { String reportName = t("lima-business.document.balanceReport.title"); - DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); - documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); - documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); - documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); - documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); - documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); - documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); - documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); - documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); - documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); + BalanceTrial balanceTrial = new BalanceTrialImpl(); + balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); - boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + List<Account> accounts = getAccounts(selectedAccounts); - BigDecimal globalDebit = BigDecimal.ZERO; - BigDecimal globalCredit = BigDecimal.ZERO; - BigDecimal globalDebitBalance = BigDecimal.ZERO; - BigDecimal globalCreditBalance = BigDecimal.ZERO; + Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(accounts)) { + Collections.sort(accounts, new AccountComparator()); - BalanceTrial balanceTrial = new BalanceTrialImpl(); - balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + setDocumentReportHeaderSelectedAccounts(documentReport, accounts); - AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - //for each account create a balance sheet with a ReportsDatas + HashMap<String, BalanceAccountImpl> accountsByClasses = new HashMap<>(); - List<Account> accounts; + //for each account create a balance sheet with a ReportsDatas + for (Account account : accounts) { + String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); - //Remove Spaces - selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts); + // all results for a account classes + BalanceAccountImpl accountSubAccounts = getBalanceAccountForAccountClass(bigDecimalFormat, subAccountsJasperReport, returnedAccounts, accountsByClasses, accountClass); - // find all if none specified - if (StringUtils.isBlank(selectedAccounts)) { - accounts = accountTopiaDao.findAll(); - } else { - accounts = accountService.stringToListAccounts(selectedAccounts); + // compute balance for the account classes + BalanceAccount subClassAccount = computeSubAccountBalance(accountClass, account, from, to, bigDecimalFormat); + + // only add it if there are results + if (subClassAccount != null) { + accountSubAccounts.addSubAccount(subClassAccount); + + balanceGlobalResult.addSubClassAccounts(subClassAccount); + } + } } + Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); + documentReport.addAllMainAccounts(returnedAccounts); + + setDocumentReportGlobalBalance(documentReport, balanceGlobalResult); + + return documentReport; + } + + @Override + public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.balanceReport.title"); + DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); + + BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); + + BalanceTrial balanceTrial = new BalanceTrialImpl(); + balanceTrial.setReportsDatas(new ArrayList<ReportsDatas>()); + + List<Account> accounts = getAccounts(selectedAccounts); + Collection<BalanceAccount> returnedAccounts = new ArrayList<>(); if (CollectionUtils.isNotEmpty(accounts)) { Collections.sort(accounts, new AccountComparator()); @@ -143,6 +163,7 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal BalanceAccount sold401 = null; BalanceAccount sold411 = null; + //for each account create a balance sheet with a ReportsDatas for (Account account : accounts) { String accountClass = String.valueOf(account.getAccountNumber().charAt(0)); @@ -157,23 +178,17 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal // we group Account 401 and 411 with there sub accounts String accountNb = account.getAccountNumber(); - if (isBalanceGeneral && ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411)))){ - BalanceAccount balanceAccount = null; + BalanceAccount balanceAccount = null; + if ((accountNb.startsWith(GROUP_401)) || (accountNb.startsWith(GROUP_411))){ if ((accountNb.startsWith(GROUP_401))){ if (sold401 == null) { - sold401 = new BalanceAccountImpl(); - sold401.setLabel(t("lima-business.document.balance.globalSupplier")); - sold401.setFormatter(bigDecimalFormat); - sold401.setAccountNumber("4010000"); + sold401 = getGlobalBalance4x(bigDecimalFormat, t("lima-business.document.balance.globalSupplier"), GLOBAL_401_ACCOUNT_NUMBER); accountSubAccounts.addSubAccount(sold401); } balanceAccount = sold401; } else if((accountNb.startsWith(GROUP_411))) { if (sold411 == null) { - sold411 = new BalanceAccountImpl(); - sold411.setLabel(t("lima-business.document.balance.globalClient")); - sold411.setFormatter(bigDecimalFormat); - sold411.setAccountNumber("4110000"); + sold411 = getGlobalBalance4x(bigDecimalFormat, t("lima-business.document.balance.globalClient"), GLOBAL_411_ACCOUNT_NUMBER); accountSubAccounts.addSubAccount(sold411); } balanceAccount = sold411; @@ -187,19 +202,12 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal addInWith(balanceAccount, subClassAccount); // add amounts to global result - globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); - globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); - globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); - globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + balanceGlobalResult.addSubClassAccounts(subClassAccount); } - } else { accountSubAccounts.addSubAccount(subClassAccount); - globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); - globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); - globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); - globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + balanceGlobalResult.addSubClassAccounts(subClassAccount); } } } @@ -208,11 +216,53 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal Iterables.removeIf(returnedAccounts, HAS_NO_ENTRY); documentReport.addAllMainAccounts(returnedAccounts); - documentReport.setTotalDebit(globalDebit); - documentReport.setTotalCredit(globalCredit); - documentReport.setDebitBalance(globalDebitBalance); - documentReport.setCreditBalance(globalCreditBalance); + setDocumentReportGlobalBalance(documentReport, balanceGlobalResult); + + return documentReport; + } + + protected BalanceAccount getGlobalBalance4x(DecimalFormat bigDecimalFormat, String label, String accountNumber) { + BalanceAccount sold401 = new BalanceAccountImpl(); + sold401.setLabel(label); + sold401.setFormatter(bigDecimalFormat); + sold401.setAccountNumber(accountNumber); + return sold401; + } + + protected List<Account> getAccounts(String selectedAccounts) { + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + List<Account> accounts; + + selectedAccounts = StringUtils.deleteWhitespace(selectedAccounts); + // find all if none specified + if (StringUtils.isBlank(selectedAccounts)) { + accounts = accountTopiaDao.findAll(); + } else { + accounts = accountService.stringToListAccounts(selectedAccounts); + } + return accounts; + } + + protected void setDocumentReportGlobalBalance(DocumentReport documentReport, BalanceGlobalResult globalBalanceResult) { + documentReport.setTotalDebit(globalBalanceResult.globalDebit); + documentReport.setTotalCredit(globalBalanceResult.globalCredit); + documentReport.setDebitBalance(globalBalanceResult.globalDebitBalance); + documentReport.setCreditBalance(globalBalanceResult.globalCreditBalance); + } + + protected DocumentReport getBalanceDocumentReport(Date from, Date to, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, String reportName) { + DocumentReport documentReport = CommonsDocumentReport.getDocumentReport(reportName, from, to, mainAccountsJasperReport, bigDecimalFormat, identityService); + documentReport.setColumnAccountTitle(t("lima-business.document.columnAccountTitle")); + documentReport.setColumnBalanceForPeriodTitle(t("lima-business.document.columnBalanceForPeriodTitle")); + documentReport.setColumnCreditTitle(t("lima-business.document.columnCreditTitle")); + documentReport.setColumnDateTitle(t("lima-business.document.columnDateTitle")); + documentReport.setColumnDebitTitle(t("lima-business.document.columnDebitTitle")); + documentReport.setColumnDescriptionTitle(t("lima-business.document.columnDescriptionTitle")); + documentReport.setColumnTotalForPeriodTitle(t("lima-business.document.columnTotalForPeriodTitle")); + documentReport.setColumnVoucherTitle(t("lima-business.document.columnVoucherTitle")); + + documentReport.setLastPageColumnDescription(t("lima-business.document.balance.lastPageColumnDescription")); return documentReport; } @@ -309,4 +359,42 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal return balanceAccount; } + private class BalanceGlobalResult { + private BigDecimal globalDebit; + private BigDecimal globalCredit; + private BigDecimal globalDebitBalance; + private BigDecimal globalCreditBalance; + + public BigDecimal getGlobalDebit() { + return globalDebit; + } + + public BigDecimal getGlobalCredit() { + return globalCredit; + } + + public BigDecimal getGlobalDebitBalance() { + return globalDebitBalance; + } + + public BigDecimal getGlobalCreditBalance() { + return globalCreditBalance; + } + + public BalanceGlobalResult invoke() { + globalDebit = BigDecimal.ZERO; + globalCredit = BigDecimal.ZERO; + globalDebitBalance = BigDecimal.ZERO; + globalCreditBalance = BigDecimal.ZERO; + return this; + } + + public void addSubClassAccounts(BalanceAccount subClassAccount) { + globalDebit = globalDebit.add(subClassAccount.getAmountDebit()); + globalCredit = globalCredit.add(subClassAccount.getAmountCredit()); + globalDebitBalance = globalDebitBalance.add(subClassAccount.getDebitBalance()); + globalCreditBalance = globalCreditBalance.add(subClassAccount.getCreditBalance()); + } + + } } diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 37206ec..ae35415 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -472,14 +472,29 @@ public class DocumentService { //############## balance ############## - public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneral, String fromToAccount) { + public void createBalanceDocuments(Date beginDate, Date endDate, String isBalanceGeneralSt, String fromToAccount) { JasperReport balanceMainAccountsReport = jasperReports.getBalanceManAccountsReport(); JasperReport balanceSubAccountsReport = jasperReports.getBalanceSubAccountsReport(); - DocumentReport report = balanceReportService.getBalanceDocumentReport(beginDate, endDate, fromToAccount, isBalanceGeneral, - getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + + DocumentReport report = getDocumentReport(beginDate, endDate, fromToAccount, balanceMainAccountsReport, balanceSubAccountsReport, isBalanceGeneralSt); + jasperReports.generatePDFReport(DocumentsEnum.BALANCE, balanceFilePath, Lists.newArrayList(report)); } + protected DocumentReport getDocumentReport(Date beginDate, Date endDate, String fromToAccount, JasperReport balanceMainAccountsReport, JasperReport balanceSubAccountsReport, String isBalanceGeneralSt) { + boolean isBalanceGeneral = StringUtils.isBlank(isBalanceGeneralSt) || Boolean.valueOf(isBalanceGeneralSt); + + DocumentReport report; + if (isBalanceGeneral) { + report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, + getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + } else { + report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, + getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); + } + return report; + } + //############## EntryBook ############# public void createEntryBooksDocuments(Date beginDate, Date endDate, List<String> entryBookCodes) { JasperReport entryBookEntryBooksReport = jasperReports.getEntryBookEntryBooksReport(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 1179c093d61c0c745d73f11a86f658066f078421 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:34:40 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. --- .../src/main/java/org/chorem/lima/report/service/DocumentService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index ae35415..9eea4b4 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -486,10 +486,10 @@ public class DocumentService { DocumentReport report; if (isBalanceGeneral) { - report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, + report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); } else { - report = balanceReportService.getGeneralBalanceDocumentReport(beginDate, endDate, fromToAccount, + report = balanceReportService.getGlobalBalanceDocumentReport(beginDate, endDate, fromToAccount, getDecimalFormat(), balanceMainAccountsReport, balanceSubAccountsReport); } return report; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 4e94d244f52771c681529ceda1a781cb914ec610 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 15:35:19 2015 +0200 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. --- .../business/api/report/BalanceReportService.java | 23 ++++++++++++---------- .../ejb/report/BalanceReportServiceImpl.java | 8 ++++---- .../resources/i18n/lima-business_en_GB.properties | 3 ++- .../resources/i18n/lima-business_fr_FR.properties | 3 ++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java index 1a23f70..4bd5c75 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/report/BalanceReportService.java @@ -33,8 +33,9 @@ import java.util.Date; */ public interface BalanceReportService { + /** - * Generate the necessary beans to make balance report. + * Generate the necessary beans to make global balance report. * * @param from from date * @param to to date @@ -45,18 +46,20 @@ public interface BalanceReportService { * @param subAccountsJasperReport Jasper sub account report for balance sub account representation * @return model for balance report */ - DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); /** + * Generate the necessary beans to make balance report. * - * @param from - * @param to - * @param selectedAccounts - * @param bigDecimalFormat - * @param mainAccountsJasperReport - * @param subAccountsJasperReport - * @return + * @param from from date + * @param to to date + * @param selectedAccounts if null all accounts will be selected + * @Param isBalanceGeneral true if general Balance is requested + * @param bigDecimalFormat format used for amount representation + * @param mainAccountsJasperReport Jasper sub report for balance's main accounts representation + * @param subAccountsJasperReport Jasper sub account report for balance sub account representation + * @return model for balance report */ - DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); + DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index dbf7208..9f3ec87 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -94,8 +94,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal }; @Override - public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima-business.document.balanceReport.title"); + public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.globalBalanceReport.title"); DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); @@ -141,8 +141,8 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal } @Override - public DocumentReport getGlobalBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { - String reportName = t("lima-business.document.balanceReport.title"); + public DocumentReport getGeneralBalanceDocumentReport(Date from, Date to, String selectedAccounts, DecimalFormat bigDecimalFormat, JasperReport mainAccountsJasperReport, JasperReport subAccountsJasperReport) { + String reportName = t("lima-business.document.generalBalanceReport.title"); DocumentReport documentReport = getBalanceDocumentReport(from, to, bigDecimalFormat, mainAccountsJasperReport, reportName); BalanceGlobalResult balanceGlobalResult = new BalanceGlobalResult().invoke(); diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 1c64e65..2fd01cb 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -16,7 +16,6 @@ lima-business.document.balance.globalClient=CENTRALISATION CLIENTS lima-business.document.balance.globalSupplier=CENTRALISATION SUPPLIERS lima-business.document.balance.lastPageColumnDescription=Global total lima-business.document.balanceForEntryBook=Total for entry book %s until %s -lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=Business N° lima-business.document.city=City @@ -47,9 +46,11 @@ lima-business.document.entrybook.lastPageColumnDescription=Total for selected en lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement lima-business.document.forMonthText=%s +lima-business.document.generalBalanceReport.title=GENERAL BALANCE lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook +lima-business.document.globalBalanceReport.title=GLOBALE BALANCE lima-business.document.grossamount=Gross Amount lima-business.document.headerCurrencyLabel=Currency\: lima-business.document.headerSelectedAccounts=%s to %s diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 49dd9cb..558a0db 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -14,7 +14,6 @@ lima-business.document.balance.globalClient=CENTRALISATION CLIENTS lima-business.document.balance.globalSupplier=CENTRALISATION FOURNISSEURS lima-business.document.balance.lastPageColumnDescription=Total général lima-business.document.balanceForEntryBook=Solde pour le journal %s jusqu'à fin %s -lima-business.document.balanceReport.title=BALANCE lima-business.document.balanceSheet=Balance lima-business.document.businessnumber=N° Siret lima-business.document.city=Ville @@ -45,9 +44,11 @@ lima-business.document.entrybook.lastPageColumnDescription=Total pour les journa lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalBalanceReport.title=BALANCE GÉNÉRALE lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général +lima-business.document.globalBalanceReport.title=BALANCE GLOBALE lima-business.document.grossamount=Brut lima-business.document.headerCurrencyLabel=Devise\: lima-business.document.headerSelectedAccounts=%s à %s -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 0919fa58b571e38dedb5d0b604f2e5fa44e5dc1f Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:44:30 2015 +0200 refs #1241 Ajout de traductions --- lima-business/src/main/resources/i18n/lima-business_en_GB.properties | 2 ++ lima-business/src/main/resources/i18n/lima-business_fr_FR.properties | 2 ++ .../src/main/java/org/chorem/lima/server/HttpServerService.java | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties index 2fd01cb..89e4c1a 100644 --- a/lima-business/src/main/resources/i18n/lima-business_en_GB.properties +++ b/lima-business/src/main/resources/i18n/lima-business_en_GB.properties @@ -46,10 +46,12 @@ lima-business.document.entrybook.lastPageColumnDescription=Total for selected en lima-business.document.entrybooks=Entry books lima-business.document.financialstatement=FinancialStatement lima-business.document.forMonthText=%s +lima-business.document.generalBalanceReport.choice=General balance lima-business.document.generalBalanceReport.title=GENERAL BALANCE lima-business.document.generalEntryBookReport.title=PROVISIONAL GENERAL ENTRY BOOK lima-business.document.generalEntrybook.lastPageColumnDescription=Provisional general entry book total lima-business.document.generalentrybook=General EntryBook +lima-business.document.globalBalanceReport.choice=global balance lima-business.document.globalBalanceReport.title=GLOBALE BALANCE lima-business.document.grossamount=Gross Amount lima-business.document.headerCurrencyLabel=Currency\: diff --git a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties index 558a0db..64845a1 100644 --- a/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties +++ b/lima-business/src/main/resources/i18n/lima-business_fr_FR.properties @@ -44,10 +44,12 @@ lima-business.document.entrybook.lastPageColumnDescription=Total pour les journa lima-business.document.entrybooks=Journaux lima-business.document.financialstatement=Bilan et compte de résultat lima-business.document.forMonthText=Mois de\:%s +lima-business.document.generalBalanceReport.choice=Balance générale lima-business.document.generalBalanceReport.title=BALANCE GÉNÉRALE lima-business.document.generalEntryBookReport.title=JOURNAL GÉNÉRAL PROVISOIRE lima-business.document.generalEntrybook.lastPageColumnDescription=Total du Journal Général lima-business.document.generalentrybook=Journal Général +lima-business.document.globalBalanceReport.choice=Balance globale lima-business.document.globalBalanceReport.title=BALANCE GLOBALE lima-business.document.grossamount=Brut lima-business.document.headerCurrencyLabel=Devise\: diff --git a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java index eaa9a13..1022869 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java +++ b/lima-server/src/main/java/org/chorem/lima/server/HttpServerService.java @@ -296,9 +296,9 @@ public class HttpServerService { + optionAccounts.toString() + "</select></div>" + "<div id='balanceType'>" - + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>Balance Générale\n" + + " <input type=\"radio\" name=\"isGeneral\" value=\"true\" checked>" + t("lima-business.document.generalBalanceReport.choice") + "\n" + " <br>\n" - + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">Balance Globale" + + " <input type=\"radio\" name=\"isGeneral\" value=\"false\">" + t("lima-business.document.globalBalanceReport.choice") + "</div>" + "<input type=\"submit\">\n" + "</form></td>" -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1241-account-report in repository lima. See http://git.chorem.org/lima.git commit 7f54c9e7f90cea3d576e8d2c44c05a69f89b7b0c Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 15:00:36 2015 +0200 refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe --- .../ejb/report/AccountReportServiceImpl.java | 98 +++++++++++----------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java index 94c74ff..14fced0 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java @@ -2,6 +2,7 @@ package org.chorem.lima.business.ejb.report; import net.sf.jasperreports.engine.JasperReport; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.chorem.lima.beans.AccountEntry; import org.chorem.lima.beans.AccountEntryImpl; import org.chorem.lima.beans.DocumentReport; @@ -48,61 +49,64 @@ public class AccountReportServiceImpl extends AbstractLimaService implements Acc setHeaderColumnTitles(documentReport); - AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); - Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); - - if (from != null && to != null && account != null) { - String selectedAccounts = account.getAccountNumber(); - - Collection<AccountEntry> accountEntries = new ArrayList<>(); - - ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); - List<Entry> entries = results.getListEntry(); - - if (CollectionUtils.isNotEmpty(entries)) { - for (Entry entry : entries) { - if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { - continue; + if (StringUtils.isNotBlank(accountId)) { + AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); + Account account = accountTopiaDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + + if (from != null && to != null && account != null) { + String selectedAccounts = account.getAccountNumber(); + + Collection<AccountEntry> accountEntries = new ArrayList<>(); + + ReportsDatas results = reportService.generateAccountsReports(account, true, from, to); + List<Entry> entries = results.getListEntry(); + + if (CollectionUtils.isNotEmpty(entries)) { + for (Entry entry : entries) { + if (entry.getAmount() == null || BigDecimal.ZERO.compareTo(entry.getAmount()) == 0) { + continue; + } + + String entryAccountNumber = entry.getAccount().getAccountNumber(); + String code = ""; + if (entry.getFinancialTransaction().getEntryBook() != null) { + code = entry.getFinancialTransaction().getEntryBook().getCode(); + } + + AccountEntry accountEntry = new AccountEntryImpl(); + accountEntry.setAccountNumber(entryAccountNumber); + accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); + accountEntry.setCode(code); + accountEntry.setVoucher(entry.getVoucher()); + accountEntry.setDescription(entry.getDescription()); + accountEntry.setLettering(entry.getLettering()); + accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); + accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); + accountEntry.setFormatter(bigDecimalFormat); + accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); + accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); + accountEntries.add(accountEntry); } + } - String entryAccountNumber = entry.getAccount().getAccountNumber(); - String code = ""; - if (entry.getFinancialTransaction().getEntryBook() != null) { - code = entry.getFinancialTransaction().getEntryBook().getCode(); - } + documentReport.addAllAccounts(accountEntries); - AccountEntry accountEntry = new AccountEntryImpl(); - accountEntry.setAccountNumber(entryAccountNumber); - accountEntry.setTransactionDate(entry.getFinancialTransaction().getTransactionDate()); - accountEntry.setCode(code); - accountEntry.setVoucher(entry.getVoucher()); - accountEntry.setDescription(entry.getDescription()); - accountEntry.setLettering(entry.getLettering()); - accountEntry.setDebit(entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO); - accountEntry.setCredit(entry.isDebit() ? BigDecimal.ZERO : entry.getAmount()); - accountEntry.setFormatter(bigDecimalFormat); - accountEntry.setDateFormat(LimaBusinessConfig.getInstance().getDateFormat()); - accountEntry.setSubTotalForLabel(t("lima-business.document.subTotal")); - accountEntries.add(accountEntry); + if (CollectionUtils.isEmpty(accountEntries)) { + selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); + } else if (accountEntries.size() == 1){ + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); + } else { + selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); } - } - documentReport.addAllAccounts(accountEntries); + documentReport.setHeaderSelectedAccounts(selectedAccounts); - if (CollectionUtils.isEmpty(accountEntries)) { - selectedAccounts += t("lima-business.document.selectedAccountNoEntryFound"); - } else if (accountEntries.size() == 1){ - selectedAccounts += t("lima-business.document.selectedAccountAndSubAccount"); - } else { - selectedAccounts += t("lima-business.document.selectedAccountAndSubAccounts"); + } else if (log.isWarnEnabled()) { + log.warn("No account present"); } - documentReport.setHeaderSelectedAccounts(selectedAccounts); - - } else { - if (log.isWarnEnabled()) { - log.warn("No account present"); - } + } else if (log.isWarnEnabled()) { + log.warn("No account present"); } return documentReport; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm