This is an automated email from the ASF dual-hosted git repository.
vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new e06b344 FINERACT-1087: Fixing date issues with bulk import templates
e06b344 is described below
commit e06b3447b9336a31fafb7bf61192cd3762ef8972
Author: Petri Tuomola <[email protected]>
AuthorDate: Sun Jul 19 21:55:46 2020 +0300
FINERACT-1087: Fixing date issues with bulk import templates
---
.../bulkimport/populator/AbstractWorkbookPopulator.java | 4 ++--
.../bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java
index e9148c5..3a17a61 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java
@@ -66,9 +66,9 @@ public abstract class AbstractWorkbookPopulator implements
WorkbookPopulator {
try {
SimpleDateFormat formatinDB = null;
if (value.matches("\\d{4}-\\d{1,2}-\\d{1,2}")) {
- formatinDB = new SimpleDateFormat("yyyy-mm-dd");
+ formatinDB = new SimpleDateFormat("yyyy-MM-dd");
} else if (value.matches("\\d{1,2}/\\d{1,2}/\\d{4}")) {
- formatinDB = new SimpleDateFormat("dd/mm/yyyy");
+ formatinDB = new SimpleDateFormat("dd/MM/yyyy");
} else if (value.matches("\\d{1,2} \\w{3,12} \\d{4}")) {
formatinDB = new SimpleDateFormat("dd MMMM yyyy");
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java
index 6da380d..743e612 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java
@@ -478,12 +478,13 @@ public class BulkImportWorkbookPopulatorServiceImpl
implements BulkImportWorkboo
private List<SavingsAccountData> fetchSavingsAccounts(Long officeId) {
List<SavingsAccountData> savingsAccounts = null;
+ String activeAccounts = "sa.status_enum = 300";
if (officeId != null) {
- String activeAccounts = "sa.status_enum = 300";
SearchParameters searchParameters =
SearchParameters.from(activeAccounts, officeId, null, null, null);
savingsAccounts =
savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems();
} else {
- savingsAccounts =
savingsAccountReadPlatformService.retrieveAll(null).getPageItems();
+ SearchParameters searchParameters =
SearchParameters.from(activeAccounts, null, null, null, null);
+ savingsAccounts =
savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems();
}
return savingsAccounts;
}