branch develop updated (d3b231b -> 1332b1f)
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 d3b231b Merge remote-tracking branch 'origin/develop' into develop adds 35fdbd3 [maven-release-plugin] copy for tag lima-0.7.3 new 67b1827 Merge branch 'master' into develop new 1332b1f refs #1162 fix fiscal transaction an enries import The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 1332b1fdee768e505a4f0f8d2f98af427021cd53 Author: dcosse <japbiw74> Date: Mon Feb 9 11:02:46 2015 +0100 refs #1162 fix fiscal transaction an enries import commit 67b1827f19bfa16f437108ecc09e9698dbb347f3 Merge: d3b231b 35fdbd3 Author: dcosse <japbiw74> Date: Mon Feb 9 09:45:02 2015 +0100 Merge branch 'master' into develop Summary of changes: .../lima/business/api/FinancialTransactionService.java | 3 +++ .../lima/business/ejb/FinancialTransactionServiceImpl.java | 13 +++++++++++-- .../org/chorem/lima/business/ejb/ImportServiceImpl.java | 8 +++++--- .../java/org/chorem/lima/ui/importexport/ImportExport.java | 8 ++++---- 4 files changed, 23 insertions(+), 9 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 67b1827f19bfa16f437108ecc09e9698dbb347f3 Merge: d3b231b 35fdbd3 Author: dcosse <japbiw74> Date: Mon Feb 9 09:45:02 2015 +0100 Merge branch 'master' into develop -- 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 1332b1fdee768e505a4f0f8d2f98af427021cd53 Author: dcosse <japbiw74> Date: Mon Feb 9 11:02:46 2015 +0100 refs #1162 fix fiscal transaction an enries import --- .../lima/business/api/FinancialTransactionService.java | 3 +++ .../lima/business/ejb/FinancialTransactionServiceImpl.java | 13 +++++++++++-- .../org/chorem/lima/business/ejb/ImportServiceImpl.java | 8 +++++--- .../java/org/chorem/lima/ui/importexport/ImportExport.java | 8 ++++---- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java index bed1d0e..da82273 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java @@ -65,6 +65,9 @@ public interface FinancialTransactionService { FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction) throws LockedFinancialPeriodException, LockedEntryBookException; + FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction, Boolean validAccountingRules) + throws LockedFinancialPeriodException, LockedEntryBookException; + void updateFinancialTransaction(FinancialTransaction financialtransaction) throws AfterLastFiscalPeriodException, BeforeFirstFiscalPeriodException, LockedFinancialPeriodException, LockedEntryBookException; diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java index 31b9ff7..970212f 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java @@ -103,11 +103,20 @@ public class FinancialTransactionServiceImpl extends AbstractLimaService impleme @Override public FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction) throws LockedFinancialPeriodException, LockedEntryBookException { + FinancialTransaction financialTransaction = createFinancialTransaction(financialtransaction, true); + return financialTransaction; + } + + @Override + public FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction, Boolean validAccountingRules) + throws LockedFinancialPeriodException, LockedEntryBookException { AccountingRules accountingRules = LimaServiceConfig.getInstance().getAccountingRules(); - //check if the financial period is blocked - accountingRules.checkFinancialPeriodBlockedWithFinancialTransaction(financialtransaction); + if (validAccountingRules) { + //check if the financial period is blocked + accountingRules.checkFinancialPeriodBlockedWithFinancialTransaction(financialtransaction); + } FinancialTransactionTopiaDao financialtransactionTopiaDao = getDaoHelper().getFinancialTransactionDao(); 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 5cdd6fa..9848089 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 @@ -247,7 +247,7 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return results; } - protected ImportExportResults importFinancialTransactionsAsCSV(String contents) { + protected ImportExportResults importFinancialTransactionsAsCSV(String contents, Boolean validAccountingRule) { ImportExportResults results = new ImportExportResults(); ImportResult result = results.createAddAndGetImportResult(FinancialTransaction.class); @@ -263,7 +263,8 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ for (FinancialTransaction financialTransaction : financialTransactions) { try { - financialTransactionService.createFinancialTransaction(financialTransaction); + // from backup don't check fiscal period close + financialTransactionService.createFinancialTransaction(financialTransaction, validAccountingRule); result.increaseCreated(); } catch (LockedFinancialPeriodException | LockedEntryBookException e) { result.addException(e); @@ -741,7 +742,8 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return globalResult; } - subReport = importFinancialTransactionsAsCSV(financialTransactions); + + subReport = importFinancialTransactionsAsCSV(financialTransactions, false); globalResult.pushImportResults(subReport); if (subReport.isErrors()){ return globalResult; 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 936b601..1d13f18 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 @@ -631,10 +631,6 @@ public class ImportExport { String transactionsStreamString = IOUtils.toString(transactionsStream); IOUtils.closeQuietly(transactionsStream); - fiscalPeriodsStream = new FileInputStream(tmpDir + FiscalPeriod.class.getSimpleName() + "-" + determinant + ".csv"); - String fiscalPeriodsStreamString = IOUtils.toString(fiscalPeriodsStream); - IOUtils.closeQuietly(fiscalPeriodsStream); - accountsStream = new FileInputStream(tmpDir + Account.class.getSimpleName() + "-" + determinant + ".csv"); String accountsStreamString = IOUtils.toString(accountsStream); IOUtils.closeQuietly(accountsStream); @@ -643,6 +639,10 @@ public class ImportExport { String entriesStreamString = IOUtils.toString(entriesStream); IOUtils.closeQuietly(entriesStream); + fiscalPeriodsStream = new FileInputStream(tmpDir + FiscalPeriod.class.getSimpleName() + "-" + determinant + ".csv"); + String fiscalPeriodsStreamString = IOUtils.toString(fiscalPeriodsStream); + IOUtils.closeQuietly(fiscalPeriodsStream); + identityStream = new FileInputStream(tmpDir + Identity.class.getSimpleName() + "-" + determinant + ".csv"); String identityStreamString = IOUtils.toString(identityStream); IOUtils.closeQuietly(identityStream); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm