branch develop updated (9fd0c2f -> d9b4a7d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository lima. See http://git.chorem.org/lima.git from 9fd0c2f refs #1297correction pour ne pas remonter les entitées ayant une date > à celle indiquée dans la période new bde8128 refs #1298 corrige NPE dans le cas ou aucune donnée existe new e3d95f9 refs #1242 ordre des traductions revu new d9b4a7d Merge branch 'feature/1298-FixNPE' into develop The 3 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 d9b4a7d36bf94993153b399524aa3999b52072ff Merge: 9fd0c2f e3d95f9 Author: dcosse <cosse@codelutin.com> Date: Sun Nov 29 07:38:18 2015 +0100 Merge branch 'feature/1298-FixNPE' into develop commit e3d95f981ee7e66c3efa06d57c21d5e371834a84 Author: dcosse <cosse@codelutin.com> Date: Sun Nov 29 07:38:02 2015 +0100 refs #1242 ordre des traductions revu commit bde81288585be9c20472a785e35282967a76a3af Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 14:46:52 2015 +0200 refs #1298 corrige NPE dans le cas ou aucune donnée existe Summary of changes: .../lima/business/ejb/AccountServiceImpl.java | 9 +++---- .../FinancialTransactionViewHandler.java | 28 +++++++++++++++------- .../FiscalControlExportViewHandler.java | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 1 + .../resources/i18n/lima-swing_fr_FR.properties | 1 + 5 files changed, 28 insertions(+), 13 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit bde81288585be9c20472a785e35282967a76a3af Author: dcosse <cosse@codelutin.com> Date: Thu Sep 24 14:46:52 2015 +0200 refs #1298 corrige NPE dans le cas ou aucune donnée existe --- .../lima/business/ejb/AccountServiceImpl.java | 9 +++---- .../FinancialTransactionViewHandler.java | 28 +++++++++++++++------- .../FiscalControlExportViewHandler.java | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 1 + .../resources/i18n/lima-swing_fr_FR.properties | 1 + 5 files changed, 28 insertions(+), 13 deletions(-) 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 29055f7..b19619f 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 @@ -298,10 +298,11 @@ public class AccountServiceImpl extends AbstractLimaService implements AccountSe @Override public Account findAccountById(String accountId) { - - AccountTopiaDao accountDao = getDaoHelper().getAccountDao(); - Account account = accountDao.forTopiaIdEquals(accountId).findUniqueOrNull(); - + Account account = null; + if (StringUtils.isNotBlank(accountId)) { + AccountTopiaDao accountDao = getDaoHelper().getAccountDao(); + account = accountDao.forTopiaIdEquals(accountId).findUniqueOrNull(); + } return account; } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java index 2ad6138..78b66f0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java @@ -38,6 +38,7 @@ import org.chorem.lima.business.exceptions.AfterLastFiscalPeriodException; import org.chorem.lima.business.exceptions.BeforeFirstFiscalPeriodException; import org.chorem.lima.business.exceptions.LockedEntryBookException; import org.chorem.lima.business.exceptions.LockedFinancialPeriodException; +import org.chorem.lima.business.exceptions.NoFiscalPeriodFoundException; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.EntryImpl; @@ -495,6 +496,8 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo e.getClosedPeriodicEntryBook().getEntryBook().getLabel(), e.getClosedPeriodicEntryBook().getFinancialPeriod().getBeginDate(), e.getClosedPeriodicEntryBook().getFinancialPeriod().getEndDate())); + } catch (NoFiscalPeriodFoundException e) { + errorHelper.showErrorMessage(t("lima.entries.add.transaction.error.noFiscalPeriodExistException")); } } } @@ -604,6 +607,8 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo e.getClosedPeriodicEntryBook().getEntryBook().getLabel(), e.getClosedPeriodicEntryBook().getFinancialPeriod().getBeginDate(), e.getClosedPeriodicEntryBook().getFinancialPeriod().getEndDate())); + } catch (NoFiscalPeriodFoundException e) { + errorHelper.showErrorMessage(t("lima.entries.add.transaction.error.noFiscalPeriodExistException")); } } @@ -987,20 +992,27 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo * * @return the last edited transaction, if none the selected transaction date, if none the begin date. */ - protected Date getUseDate() { + public Date getUseDate() throws NoFiscalPeriodFoundException { FinancialPeriod financialPeriod = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem(); - Date beginDate = financialPeriod.getBeginDate(); - Date endDate = financialPeriod.getEndDate(); - if (lastAssignDate == null - || lastAssignDate.before(beginDate) - || lastAssignDate.after(endDate) ) { + if (financialPeriod != null) { + Date beginDate = financialPeriod.getBeginDate(); + Date endDate = financialPeriod.getEndDate(); - FinancialTransaction selectedTransaction = getSelectedFinancialTransaction(); - lastAssignDate = selectedTransaction == null ? beginDate : selectedTransaction.getTransactionDate(); + if (lastAssignDate == null + || lastAssignDate.before(beginDate) + || lastAssignDate.after(endDate) ) { + + FinancialTransaction selectedTransaction = getSelectedFinancialTransaction(); + lastAssignDate = selectedTransaction == null ? beginDate : selectedTransaction.getTransactionDate(); + } + + } else { + throw new NoFiscalPeriodFoundException(); } + return lastAssignDate; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/fiscalControlExport/FiscalControlExportViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/fiscalControlExport/FiscalControlExportViewHandler.java index f5b892f..4bcca2a 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/fiscalControlExport/FiscalControlExportViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/fiscalControlExport/FiscalControlExportViewHandler.java @@ -92,7 +92,7 @@ public class FiscalControlExportViewHandler { List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); view.getEntryBookAtNewComboBoxModel().setObjects(entryBooks); Identity identity = identityService.getIdentity(); - view.getSirenWarnLabel().setVisible(StringUtils.isBlank(identity.getBusinessNumber())); + view.getSirenWarnLabel().setVisible(identity != null && StringUtils.isBlank(identity.getBusinessNumber())); } public void export() { 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 1bfb522..c9fc584 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 @@ -525,3 +525,4 @@ lima.vatStatement.remove.title=Remove line ? lima.vatStatement.shortened=Shortened vat statement chart lima.vatStatements=VAT statements lima.wait=Work in progress +lima.entries.add.transaction.error.noFiscalPeriodExistException=No fiscal period exist ! \ No newline at end of file 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 54a9304..50e7d3b 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 @@ -530,3 +530,4 @@ lima.vatStatement.remove.title=supprimer de ligne ? lima.vatStatement.shortened=Abrégé lima.vatStatements=Plan TVA lima.wait=Traitement en cours +lima.entries.add.transaction.error.noFiscalPeriodExistException=Aucun exercice de créer ! \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit e3d95f981ee7e66c3efa06d57c21d5e371834a84 Author: dcosse <cosse@codelutin.com> Date: Sun Nov 29 07:38:02 2015 +0100 refs #1242 ordre des traductions revu --- lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties | 2 +- lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 c9fc584..a9327ea 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 @@ -140,6 +140,7 @@ lima.entries.add.transaction.error.afterLastFiscalPeriod=Add financial transacti lima.entries.add.transaction.error.beforeFirstFiscalPeriod=Add financial transaction failed, financial transaction date is before first fiscal period date lima.entries.add.transaction.error.lockedEntryBook=Add financial transaction failed, closed entry book lima.entries.add.transaction.error.lockedFinancialPeriod=Add financial transaction failed, closed financial period +lima.entries.add.transaction.error.noFiscalPeriodExistException=No fiscal period exist \! lima.entries.addEntry=New entry lima.entries.addTransaction=New transaction lima.entries.assign.entries=Assign this value in all entries in transaction @@ -525,4 +526,3 @@ lima.vatStatement.remove.title=Remove line ? lima.vatStatement.shortened=Shortened vat statement chart lima.vatStatements=VAT statements lima.wait=Work in progress -lima.entries.add.transaction.error.noFiscalPeriodExistException=No fiscal period exist ! \ No newline at end of file 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 50e7d3b..aa59c3a 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 @@ -155,6 +155,7 @@ lima.entries.add.transaction.error.afterLastFiscalPeriod=Impossible d'ajouter un lima.entries.add.transaction.error.beforeFirstFiscalPeriod=Impossible d'ajouter une transaction avant le %1$te %1$tB %1$tY début du premier exercice. lima.entries.add.transaction.error.lockedEntryBook=Impossible d'ajouter une transaction car le jounal %2$s (%1$s) est cloturé pour la période du %3$te %3$tB %3$tY au %4$te %4$tB %4$tY. lima.entries.add.transaction.error.lockedFinancialPeriod=Impossible d'ajouter une transaction car la période fiscale du %3$te %3$tB %3$tY au %4$te %4$tB %4$tY est cloturée. +lima.entries.add.transaction.error.noFiscalPeriodExistException=Aucun exercice de créer \! lima.entries.addEntry=Créer une entrée dans la transaction (Ctrl+N) lima.entries.addTransaction=Créer une transaction (Ctrl+Maj+N) lima.entries.assign.entries=Assigner cette valeur à toutes les écritures de la transaction (Ctrl+Alt+A) @@ -530,4 +531,3 @@ lima.vatStatement.remove.title=supprimer de ligne ? lima.vatStatement.shortened=Abrégé lima.vatStatements=Plan TVA lima.wait=Traitement en cours -lima.entries.add.transaction.error.noFiscalPeriodExistException=Aucun exercice de créer ! \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit d9b4a7d36bf94993153b399524aa3999b52072ff Merge: 9fd0c2f e3d95f9 Author: dcosse <cosse@codelutin.com> Date: Sun Nov 29 07:38:18 2015 +0100 Merge branch 'feature/1298-FixNPE' into develop .../lima/business/ejb/AccountServiceImpl.java | 9 +++---- .../FinancialTransactionViewHandler.java | 28 +++++++++++++++------- .../FiscalControlExportViewHandler.java | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 1 + .../resources/i18n/lima-swing_fr_FR.properties | 1 + 5 files changed, 28 insertions(+), 13 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm